Tweaked.io making your servers fly

Measuring Performance

Whenever you attempt to make a tweak to your systems performance you need to know what result you've achieved, if any.

The best way to do that is to use a tool to test your servers performance, or throughput, and run that both before and after making any particular change.

There are several benchmarking applications and tools out there, and this small page contains a list of the ones you're most likely to need to use.

Webserver Stress-Testing

Webserver benchmarking largely consists of firing off a few thousand requests at a server, and reporting on the min/max/average response time.

Obviously a server "loses points" if some of the response are errors, rather than valid results, but generally the testing is a matter of juggling the number of total requests, or concurrent requests, until you reach a point where the server starts to take too long to respond, or fails completely.

ab

One of the most popular tools for benchmarking for many years was ab, the Apache benchmark tool. This is looking a little dated now, but still works well.

If you're running Apache you probably have this installed already, which explains its popularity. Give it a URL, a number of requests, and a concurrency level and it will issue a small report:

ab -c 10 -n 1000 http://example.com/

The example above fired 1000 requests, with 10 at a time, to the URL http://example.com/ and the results for me look something like this: