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

I wanted to stress test by webserver. Here is how i want to do it.

I have 'u' different urls on my webserver. so i need to hit these urls in parallel, with a hit rate of 'n' hit per second, per url.

what would be the best tool to do this ?

share|improve this question

3 Answers 3

up vote 0 down vote accepted

Try httperf utility.

Here is its usage example:


httperf --hog --server foo.bar --num-conn 100 --ra 10 --timeout 5 --uri /test

This asks foo.bar 100 times for URI /test with fixed rate 10 connection per second. If you want to ask different URI's, run many httperf instances in parallel mode with different --uri parameters.

share|improve this answer
    
httperf is cool, but I keep getting segfaults for heavier tests. --ra 10 is fairly low. –  Tudorizer Aug 24 '11 at 9:11

Your title suggests that you have jmeter which is how I would do it. Create a test plan that has all the URLs in a Random group with a percentage matching your usage statistics (if you have any, otherwise just stick with an even distribution). Then set up a user to hit pages every n seconds (depending on how much text is on each page users will stay there between 4 and 40 seconds) and set it up to ramp up to a very large number of users. The only problem with jmeter is that it will sometimes overwhelm its own host before it overwhelms the webserver. Also, you need the machine you are testing and the machine you are testing with to be on the same LAN segment to take out the possibility that bandwidth is affecting your results.

share|improve this answer

Apache JMeter is free and open source tool, it's one of the most powerful performance testing applications, it has GUI, provides support for multiple protocols, record-and-replay functionality, assertions and reporting tools out of the box, it can be extended with custom samplers and plugins, lots of existing plugins (see the list at http://jmeter-plugins.org/wiki/Start/ has big community.

To specify exact load in "requests per second" you can use Constant Throughput Timer

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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