Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've had to load test HTTP servers/web applications a few times, and each time I've been underwhelmed by the quality of tools I've been able to find.

So, when you're load testing a HTTP server, what tools do you use? And what are the things I'll most likely do wrong the next time I've got to do it?

share|improve this question

11 Answers 11

up vote 23 down vote accepted

JMeter is free.

Mercury Interactive Load Runner is super nice and super expensive.

share|improve this answer
    
I do like JMeter. Because you can use it to set up expansive, full site load tests, or you can spend 5 minutes and set up a test for one particular function. Good interface too, with lots of options. –  Milner May 12 '09 at 14:30

For a quick test you could use curls sequences and sets of URL's. Say for example we're going to run a load stress test against Google we can run...

curl -s "http://google.com?[1-1000]"

This will make 1000 calls to google i.e.

http://google.com?1  
http://google.com?2  
http://google.com?3 
... 
http://google.com?1000

This is discussed in more detail at How to quickly stress test a web server with curl.

share|improve this answer

It depends on how complex your scenario is.

To correctly simulate real users load on your server, you should try to simulate what the users are actually doing. If your users just hit the server with a URL, any of the free/simple tools would do.

For web-site that are a bit more complex, you would want to use a tool that helps you with dynamic value correlation, parameterization etc. You can use Load-Runner and the like, I prefer to use WebLOAD.

share|improve this answer

We use WAPT, and it works very well. Easy to set up, and just a few hundred bucks. LoadRUnner is ridiculously overpriced, and totally out of reach for all but hte Forutune 500.

share|improve this answer

You will need to set up different tests:

  • Normal test, simulate users like they will behave. You will implement think time (no http fury 1s between pages). One way is to record a web session, so you will have realistic time to complete/read each page. Load will come step by step until you reach the average current load in production
  • Rupture test: Same as before, but add load until you get the first http 500 error. The goal is to know how much load you can manage until it will break
  • Long running test. You keep the first scenario running for 12 hours, to be sure you don't have memory leak, or performance degradation over time.

After/before each test, you must put back the platform as before: restore database, reboot to clean memory and cache.

You will also implement a warm-up: Launch scenarios once before the real test, so web pages are compiled, connection to database made. Else, the first call will always be bad in your stats.

You can add complexity, like:

  • use different scenarios (visitors/guest, members), that will performs differently.
  • Simulate differents bandwidth access
  • Randomize searched word and think time.

One last important thing: You MUST save all completed scenario to be able to make them again exactly the same way, so you can compare performance with previous tests.

share|improve this answer
    
Excellent summary of strategies. –  mjhm Dec 11 '12 at 19:33

I feel unusually qualified to answer this question, since my current company needs to simulate 25,000 simultaneous connections to our web servers (we serve online ads).

For extremely high-volume load testing, Httperf is the way to go. It's free, and in our experience, it can simulate more simultaneous connections that JMeter or STA on the same hardware.

Edit:

Just in case you're curious, we simulate 3500 requests per second on a low-power, inexpensive, ultra-small-form-factor Optiplex 330. These little boxes cost only $280, and we have a bunch of them hooked up to run Httperf on-demand. By comparison, JMeter could only push about 800-900 req/sec on this hardware.

share|improve this answer

If you just want to throw load at a single URL at a time on a web server then download Apache AB. It comes with Apache HTTP server.

Simple command

ab -n 10000 -c 10 http://serverfault.com/questions/2107/tools-for-load-testing-http-servers

would run 10000 requests with a concurrency of 10 users.

If you want to record browsing sessions then go upvote and accept the jmeter answer. Jmeter is amazing and it can scale to many test machines that can throw huge load.

share|improve this answer
2  
Keep in mind that ab's -n is the number of responses received before it stops sending requests. When you increase the concurrency, threads are still sending requests before the responses are counted. The above would actually send about 10005 requests. JMeter does not suffer from this problem. –  Peter Sankauskas Aug 28 '09 at 1:21
    
ab runs single-threaded and uses select to run through connections. This means that every now and then it will just stop sending load while it collects closed connections. You'll notice this if you go past 16000 requests which you need if you push concurrency up past 500. –  bluesmoon Sep 4 '11 at 15:07

There is Tsung, an Erlang based tool.

There's also a really long list of tools over at http://www.softwareqatest.com/qatweb1.html#LOAD

share|improve this answer

I used LoadRunner before but, it's rather expensive, I've also used Microsoft's Team Tester edition tools which includes a system that conduct load tests. I was fairly happy with how the tool worked, and you could expand the tests using .net which was an easier syntax to pick up then LoadRunner's.

The version of load runner we used also couldn't handle our AJAX site (This was back in 2000 so I am sure the tool has been enhanced by now)

share|improve this answer

I've used openSTA.

This uses a relatively simple script language.

You can easily test web services / servers and write your own scripts.

It allows you to put scripts together in a test in any way you want and configure the number of iterations, the number of users in each iteration, the ramp up time to introduce each new user and the delay between each iteration. Tests can also be scheduled in the future.

It's open source and free.

It produces a number of reports which can be saved to a spreadsheet. We then use a pivot table to easily analyse and graph the results.

share|improve this answer

If you are just looking to test how it handles multiple connections you can use something like Siege. Still not sure it is a great measure but it will at least tell you how you are handling multiple connections

share|improve this answer

protected by Chris S Mar 20 '13 at 23:56

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.