What Siege and wrk Measure Differently
Both tools generate HTTP load, but they answer different questions. Siege is a URL-file driven load generator with session support, cookies and per-transaction reporting; it models a browsing user hitting a set of pages in sequence. wrk is a single-binary HTTP benchmarker built around a fixed request loop with Lua scripting, and it reports latency percentiles rather than per-URL breakdowns.
That split matters more than raw numbers. Siege gives you “how does this WordPress site behave for someone clicking through six pages,” while wrk gives you “how many identical requests per second can this endpoint absorb.” Running only wrk on a static file will produce an impressive figure that says nothing about the PHP and database path your users actually walk.
Install Both Without Wasting a Build
On Debian and Ubuntu, apt-get install siege gives a usable version. wrk is usually not packaged; build it with git clone https://github.com/wg/wrk && cd wrk && make, which needs build-essential and libssl-dev. The build takes under a minute on one vCPU and produces a single static binary you can copy anywhere.
Check versions before trusting results: siege --version and wrk --version. Siege 4.x changed its default reporting, so an old 3.x build from a third-party repo will produce numbers that do not compare with current documentation. Pin the version in your notes along with the kernel and any sysctl changes, or your benchmarks are not reproducible.
Build a Realistic Siege URL File
Siege needs a urls.txt with one target per line. For a realistic mix, list the homepage, a category page, a single post, a search result and a static asset, then weight them by repeating entries. A file with 10 homepages, 30 articles and 60 static assets models a cacheable site far better than an equal split, and it will show you whether your nginx or Varnish layer is doing its job.
Run the first pass with siege -c 25 -t 60s -f urls.txt. The -c flag is concurrent users and -t is duration. Use -b for benchmark mode (no delay between requests) only when you want saturation, not user simulation. Save output with --log=siege.log and parse the CSV afterward instead of reading the screen.
Use wrk for Latency Distribution, Not Just RPS
A typical wrk invocation is wrk -t2 -c50 -d30s --latency https://example.com/. Threads should match available vCPUs; on a 2 vCPU VPS, -t2 is correct and -t8 just adds context switching. The --latency flag prints the distribution table, which is the whole point: a 50 ms average with a 900 ms 99th percentile is a broken experience hiding behind a decent mean.
Keep the load generator off the machine under test. Running wrk against localhost measures the loopback path and competes with the server for CPU, which flatters results at low concurrency and distorts them at high concurrency. Use a second VPS in the same region and note the network round-trip time separately, because 0.5 ms of LAN latency will dominate a fast static endpoint.
Read the Percentiles and Throw Away the Average
wrk reports p50, p75, p90 and p99. Siege reports average response time, transaction rate and a longest-transaction figure. The two are not interchangeable, and averaging them together is meaningless. If you must pick one number to compare releases, use p99 from wrk for synthetic load and longest transaction from siege for the browsing mix — both surface tail behaviour that averages hide.
A practical rule for a small VPS: a static asset should hold p99 under 50 ms on a LAN, a cached page under 150 ms, and a dynamic PHP page under 600 ms at 25 concurrent users. When p99 exceeds roughly five times p50, you have queueing, not slowness — look at PHP-FPM pm.max_children saturation and database connection limits before touching application code. Repeating the run on a virtualserversvps.com instance of the same tier tells you whether the tail belongs to your application or to the host.
Recognise When the Client Is the Bottleneck
The classic mistake is declaring the server healthy at 3,000 requests per second when the bottleneck is the load generator’s own CPU. Check with top on the client machine during the run; if wrk sits near 100 percent of one core, it is the limiter. Raising -t helps only until you run out of cores, and after that you need a second generator or a distributed setup.
Signs of client-side limiting include flat RPS as you increase concurrency, non-errors, and latency percentiles that stay suspiciously constant while connection count rises. Confirm by running the same test against a known-fast static host; if that also caps near the same number, the client is the ceiling, not the target. Also watch ss -s on the client for socket exhaustion and raise ulimit -n if needed.
Keep the Numbers Comparable Over Time
Record, alongside every result: the exact command line, kernel version from uname -r, whether the page was cached, and the server’s vmstat 1 snapshot during the run. Without those, a later benchmark that differs by 30 percent is uninterpretable — you cannot tell whether code, config or the host changed.
Run each test three times and report the median, not the best. Then change one variable and repeat. That discipline turns load testing from a curiosity into a decision tool, and it is the same reason a dedicated virtualserversvps.com instance beats benchmarking on a noisy neighbour: you control the CPU, disk and network, so a regression in your own stack is visible instead of being buried in steal time.


Leave a Reply
You must be logged in to post a comment.