How do I analyze an Apache Bench result?
When running load tests, picking an arbitrary number and hitting your server is generally not a good way to go. All you've proven is that your server can handle 200 concurrent visitors as long as they don't mind waiting ~7s for their request to load. What you PROBABLY want to do is:
- First, establish a baseline. Use 1 visitor (concurrency of 1).
- Second, start ramping up numbers. For example, 1, 10, 25, 50, 100, 125, 150, 200, etc..
- Finally, make sure these requests run for prolonged periods of time (i.e., don't just start it up and then ^C it)
Once you have your results, graph them: number of visitors versus average request times, including max and min bars. Basically, load testing of an arbitrary application is only as useful as relevant tests; in this case, for example, if it takes 1 visitor 6s to load a page, then 7s a page for 200 visitors doesn't sound to bad, does it?
you can start by setting a startup number of requests and number of concurrent requests and check the results as follows :
- Total Number of Requests per seconds
- Average Time Per Request
- Average waiting / processing / connecting times
then you can scale them up by increasing the number of concurrent connections till you reach close to the expected number of users and watch the response of your service and repeat it for number of times and check the time variation and take the average