How to load test a home server
September 8, 2006 3:03 AM   Subscribe

How to (gently) load-test my home server (linux, details inside)

So I've set up an old PC as a webserver using my home ADSL connection, mainly for my own education (and I'm certainly learning a lot!). I use it mainly to serve my blog, which up till now has been a very small-scale personal project for friends and family (awstats reports 4361 hits last month). I've been thinking about posting a few longer articles about semi-obscure but possibly useful-to-some-people topics (managing bibliographies in Openoffice, HDR photography in linux, etc). Thus, I'm wondering how my connection will cope if several people try to connect at the same time - this also made me wonder about image/page optimisation, etc.

So, in the interests of learning more about this stuff, I need advice on how to simulate multiple connections to my server. At first I though that there might be a free online service for this, but then I realised that such a service would be an easy way to DOS someone else's server, and was thus unlikely to exist. I have access to a (linux) work computer on a much faster connection, so presumably I could simulate multiple connections to my server from here (I'm thinking upstream bandwidth from the server will probably be the bottleneck). I've had a quick look at openwebload which seems to be along the right lines. Ideally I'd like to be able to test the responsiveness of the front page, different pages, static vs dynamic pages, images on my server vs hosted elsewhere, etc with different numbers of connections.

I know that the sensible thing to do if I were expecting a large amount of traffic to a particular article would be to have it hosted somewhere else, but I'm a geek and I feel I might learn something if I try it myself. I know a lot of MeFites are sysadmin etc., I'd be grateful for any suggestions. Just ask if you need more details.
posted by primer_dimer to Computers & Internet (4 answers total) 1 user marked this as a favorite
My favourite simple tool for this is ab, apache bench. It does quick HTTP requests in parallel and measures throughput and failures. I believe it's part of the Apache distribution.

When doing a test like this you should carefully consider first what you want to measure. If you're serving static content there's not a lot to benchmark; it's going to be as fast as your network connection. If you have a dynamic app then you want to measure performance under many simultaneous sessions. In that scenario, be sure your client test computer and your network are fast enough that you know the server itself is the bottleneck.
posted by Nelson at 3:18 AM on September 8, 2006

Apache JMeter is mostly aimed at regression-type testing, but it can probably do the sort of load testing you want. In my experience, the load-testing component isn't very rigorous or detailed, but it's probably good enough for what you need. And it's free.
posted by MrMoonPie at 7:00 AM on September 8, 2006

How's your scripting? cURL and its sister libcURL is great for this sort of thing if you want to get your hands dirty and write something yourself.

(IAAWebTester, but I don't know much about existing free/OS software)
posted by corvine at 9:25 AM on September 8, 2006

I've been very happy using Grinder. It will let you script (through a browser proxy, so it's easy) any sort of load you want. Then hammer away with multiple threads. That in combination with SAR provides more information than you'll know what to do with.
posted by roue at 9:33 AM on September 8, 2006

« Older What's a good presentation for a kid's program?   |   giving notice in Scotland Newer »
This thread is closed to new comments.