What Is Nginx Worker Connections and How Many Do You Actually Need?

nginx worker connections

Open the Nginx config on almost any VPS and you will find a harmless-looking line: worker_connections 1024;. Most people ignore it until their site starts throwing 500 errors during a traffic spike. Nginx worker connections is the setting that caps how many simultaneous connections a single Nginx worker process can handle. Set it too low … Baca Selengkapnya

How to Serve Static Files Faster with Nginx: Expires Headers and Cache-Control

serve static files faster with nginx

Every repeat visitor to your site downloads the same CSS, JavaScript, images, and fonts again unless you tell their browser not to. That wastes bandwidth, and on a small VPS it also wastes CPU serving files that never change. The fix is two HTTP headers, and you can set both in Nginx in about ten … Baca Selengkapnya

WordPress Revisions Transients Cleanup: Speed Up Your Site

WordPress revisions transients cleanup is the fastest database job you can do on a neglected site. Every time you save a post, WordPress stores a full copy as a revision. Every plugin that caches a result in the database leaves a transient behind, and expired ones do not always get removed. After a year of … Baca Selengkapnya

WordPress 1GB VPS Speed: How to Keep It Fast Without Upgrading

WordPress 1GB VPS speed is a memory problem first and a CPU problem second. One gigabyte sounds small, but WordPress itself is not the heavy part. The heavy parts are the PHP workers, the database, and the plugins that run on every page load. When memory runs out, the server starts swapping to disk, and … Baca Selengkapnya

Diagnosing a Slow VPS: htop, iotop, and vmstat Walkthrough

Diagnosing a slow VPS starts with one question: is the bottleneck CPU, memory, or disk? Guessing wrong wastes an afternoon tuning the wrong thing, and on a small server the three bottlenecks feel alike from the outside. A slow page can mean a busy CPU, a swapping database, or a disk that cannot keep up, … Baca Selengkapnya

OPcache Setup Guide: PHP 8.3 Performance Tuning on Ubuntu

OPcache setup guide PHP 8.3 users on Ubuntu should read before they pay for a bigger VPS, because the biggest PHP speed win on a small server is often free. OPcache stores compiled PHP scripts in shared memory, so the server skips parsing and compiling on every request. The first request compiles the script, and … Baca Selengkapnya

MySQL vs PostgreSQL on a 2GB VPS: Which One Should You Choose?

MySQL vs PostgreSQL 2GB VPS owners face a real choice, because on a small server the two databases behave differently in ways that matter more than their feature lists. MySQL uses less memory at idle and is simpler to run alongside WordPress. PostgreSQL handles complex queries and concurrent writes better, but it wants more memory … Baca Selengkapnya