Use httperf for Server Benchmarking
October 18, 2011
When you're prototyping Web applications or just trying to test and tune your Web servers, one of the best tools you can start with is httperf.
The name probably gives it away, but httperf is a tool that generates workloads to test HTTP servers. It works with HTTP/1.0 and HTTP/1.1, as well as SSL if needed. It was written by David Mosberger for HP, and it is released under the GPLv2.
The tool has moved around a bit; it was initially hosted on SourceForge but now resides on Google Code. It's worth noting that httperf is fairly mature and not changing a lot at this point. The most recent release (0.9) is a few years old, but that shouldn't be a problem. Most Linux distros have httperf packaged already, so if you're on Debian, Ubuntu, Fedora, openSUSE and so on, you should just be able to grab it from the distribution repositories. If not, the tarball is on Google Code.
A couple of notes if you're going to be using httperf. First, don't point it at someone else's server. Performance testing other people's systems is usually frowned on. Second, run httperf on a different system from the ones you're profiling. Why? Because httperf can be a bit resource intensive and you don't want to be skewing the results by running it and your Web server on the same system.
The most basic use of httperf is just
After you run httperf, it will generate a report with information about the test. This includes the number of connections, rate of connections, request size, request rate, reply time/size and rate, and much more. You'll also get a list of errors, if any.
Naturally, httperf has many more options than just the
There's also a
To get started with httperf, you might want to use Theodore Bullock's Quickstart Guide (PDF), which gives a thorough rundown of the options and some good examples.
It's not terribly difficult to get started with httperf, but it can be very useful. Give it a try next time you need to do any kind of performance testing on a Website or application.
Joe 'Zonker' Brockmeier is a freelance writer and editor with more than 10 years covering IT. Formerly the openSUSE Community Manager for Novell, Brockmeier has written for Linux Magazine, Sys Admin, Linux Pro Magazine, IBM developerWorks, Linux.com, CIO.com, Linux Weekly News, ZDNet, and many other publications. You can reach Zonker at firstname.lastname@example.org and follow him on Twitter.