Okay people, i often heard the words “Requests Per Second” with respect to a CMS installation on a server. After doing a BIT of work, i learned what tools will allow you to measure that. Which could become very useful if you are trying to see how well your server bEe hIvE under high load.
There are few tools out there, i’m going to talk about one:
AB Which abriviates Apache Benchmark. Very simple command line tool which just does the trick quick, and easy. Here is how i use it.
ab -n 100 -c 5 http://www.example.com
- -n: Is the number of hits which it will generate.
- -c: Number of threads which it will run to simulate the number of people.
You can get fancy with this by using the -p switch to specify a file which contains post values. So
ab -n 100 -c 5 -p fancypostfile.txt http://www.example.com
where your fancypostfile.txt looks like this
Okay, so assume that you would like to add a username and a password authentication. You can do that by using the -A switch like so.
ab -n 100 -c 5 -p fancypostfile.txt -A username:password http://www.example.com
You can run this from any shell promt around the world!, HOWEVER, i recommend using this test on your hosted server machine because it will eleminate the factors of network delays etc and will allow you to evaluate your application more clearly.
You would excecute these commands on your shell accounts. So you would have to have an SSH username/password/server and you would something like Putty to login and excecute these commands (If your a windows user). Another thing i would like to make clear, THIS DOES NOT SPEED UP YOUR APPLICATION. It will simply tell you how fast/slow it is right now!.
3 Comments so far
Leave a comment