Here are a few notes about executing the stress test:
If you are using only one computer, remember that you are using only one CPU, one memory, one internet connection and one operating system. So I would advise not to do many things at once in your computer while you test (for example, don’t download that torrent!)
Also, I would not to do any CPU-intensive activity while stress testing my web application
Each single test may fail. I didn’t have that problem often, 1 out of 12 tests. But one of them did not finish correctly. You can see this by comparing the total requests per test (compared to other tests you performed) – For example, your internet connection might unexpectedly go down and make your test useless
Have a good connection. You should properly measure the delay you have between your computer and the server. The delay I had between my client and server was minimal
I ran a set of tests to have a base set of results. The initial set of results was not good (though I was expecting this). I noticed there was a high load on the database. Mongrel was not taking most of the server resources, MySQL was.
With our team, we decided to implement a mongrel-level cache to reduce database access and improve performance/throughput.
The second set of tests showed a big improvement. Performance improved a lot! The cache reduced the load on the database. This was very noticeable. We applied the cache to the most visited sections. To know which were the most visited sections, we used historical Google Analytics data from the project.
The set of tests didn’t vary on the client side. I simulated a load of 100, 200, 500, 750, 900, 950 and 1100 concurrent users.
The result improvements were 3 times better (the lowest), 15 times better (the highest) and 11 times better (the average)
To sum things up, JMeter is a very useful tool for stress testing web applications. You will have to read their documentation to understand the graphic results (numbers are shown but units are not always shown).
If you haven’t developed any performance-related code (eg. cache) for your application, run a first set of stress tests before you do. This will give you a base for improvement.
Develop your performance improvements, test them, make sure they are working as expected (eg. cache invalidation working properly) and then run your second set of tests. You will definitely make a difference on the throughput of your application. If not, you will have to keep making improvements until you see the results.
web applications stress testing with JMeter (part 2)
Here are a few notes about executing the stress test:
I ran a set of tests to have a base set of results. The initial set of results was not good (though I was expecting this). I noticed there was a high load on the database. Mongrel was not taking most of the server resources, MySQL was.
With our team, we decided to implement a mongrel-level cache to reduce database access and improve performance/throughput.
The second set of tests showed a big improvement. Performance improved a lot! The cache reduced the load on the database. This was very noticeable. We applied the cache to the most visited sections. To know which were the most visited sections, we used historical Google Analytics data from the project.
The set of tests didn’t vary on the client side. I simulated a load of 100, 200, 500, 750, 900, 950 and 1100 concurrent users.
The result improvements were 3 times better (the lowest), 15 times better (the highest) and 11 times better (the average)
To sum things up, JMeter is a very useful tool for stress testing web applications. You will have to read their documentation to understand the graphic results (numbers are shown but units are not always shown).
If you haven’t developed any performance-related code (eg. cache) for your application, run a first set of stress tests before you do. This will give you a base for improvement.
Develop your performance improvements, test them, make sure they are working as expected (eg. cache invalidation working properly) and then run your second set of tests. You will definitely make a difference on the throughput of your application. If not, you will have to keep making improvements until you see the results.
Have fun!