If you're new to performance testing and just starting out using JMeter like me, it can be a little daunting. There's a lot to learn, and there's really no one thing you can read that will make you get it. You just have to play with it for a while until you start to get it. Here's a few things that might help you get started.
Reference Material
Ophir Prusak from BlazeMeter has a couple of good intro videos on JMeter
The thing I like about these videos is that they are clear, decently explained with just he right amount of information, and aren't too technical. These videos are aimed at promoting the BlazeMeter product, but they focus more on JMeter itself, and contain a lot of information.
WebPageTest.org is a handy open source performance tool to use in conjunction with JMeter. It can analyze page load speeds of applications available on the web.
Mobile Web Performance - Getting and Staying Fast
This is a nice introduction to performance of websites for consumption by mobile devices.
Basic Web Performance Testing With JMeter and Gatling
My original blog post on getting started with JMeter and Gatling.
Mobile Web Performance - Getting and Staying Fast
This is a nice introduction to performance of websites for consumption by mobile devices.
Basic Web Performance Testing With JMeter and Gatling
My original blog post on getting started with JMeter and Gatling.
Notes
JMeter Tests Back-end Only
This might be obvious, but JMeter is used to test the back end of a website. It doesn't load the HTML responses into a browser, or run any JavaScript. If you want to measure page load speeds the user will notice, you need to use other tools. For example, using JMeter to generate load on your site, then use Selenium / WebDriver to load your site.
Users = Threads
This is basic JMeter, but worth nothing for beginners. In JMeter, a user is represented as a thread. If you want to simulate more users, you add more threads to a thread group.
There are only a limited number of threads that can be handled by JMeter, since a JMeter thread uses an OS thread. The maximum number of threads is machine dependent, but you can expect up to 1K threads at best. After that you would need to start using a cluster of machines running JMeter.
Request Rates
The measure of the load put on the web server is the number of requests sent to the server in a given period of time (e.g. requests per second). To increase the load, you can increase the number of users (threads), and / or decrease the amount of delay (aka think time) between requests.
To estimate the load put on the server, divide the number of threads by the think time. E.g. 100 users / 10 s = 10 requests per second. This is an upper bound of course, since it doesn't factor in the amount of time the server takes to process the response, but if you have a low latency site, the math is accurate enough.
Tip use a Constant Timer in your test plan to simulate think time. Then you can tweak the think time and the number of threads to get the desired load your after.
Tip: Use a Throughput Shaping Timer (from the Standard Plugins) to level out your request rate. As the number of threads increases, you may see peaks and valleys in the hit rate. The Throughput Shaping Timer can ensure that the hit rate doesn't exceed the configured value. You might want to do this if you're measuring CPU usage on the app server, and CPU is sensitive to the hit rate.
Standard Plugins
The Standard JMeter Plugins are pretty handy to have in your toolbox. I especially like the Ultimate Thread Group, PerfMon plugins, as well as the extra graphing plugins (Response Times Over Time, Active Threads Over Time and the Hits Per Second).
Users = Threads
This is basic JMeter, but worth nothing for beginners. In JMeter, a user is represented as a thread. If you want to simulate more users, you add more threads to a thread group.
There are only a limited number of threads that can be handled by JMeter, since a JMeter thread uses an OS thread. The maximum number of threads is machine dependent, but you can expect up to 1K threads at best. After that you would need to start using a cluster of machines running JMeter.
Request Rates
The measure of the load put on the web server is the number of requests sent to the server in a given period of time (e.g. requests per second). To increase the load, you can increase the number of users (threads), and / or decrease the amount of delay (aka think time) between requests.
To estimate the load put on the server, divide the number of threads by the think time. E.g. 100 users / 10 s = 10 requests per second. This is an upper bound of course, since it doesn't factor in the amount of time the server takes to process the response, but if you have a low latency site, the math is accurate enough.
Tip use a Constant Timer in your test plan to simulate think time. Then you can tweak the think time and the number of threads to get the desired load your after.
Tip: Use a Throughput Shaping Timer (from the Standard Plugins) to level out your request rate. As the number of threads increases, you may see peaks and valleys in the hit rate. The Throughput Shaping Timer can ensure that the hit rate doesn't exceed the configured value. You might want to do this if you're measuring CPU usage on the app server, and CPU is sensitive to the hit rate.
Standard Plugins
The Standard JMeter Plugins are pretty handy to have in your toolbox. I especially like the Ultimate Thread Group, PerfMon plugins, as well as the extra graphing plugins (Response Times Over Time, Active Threads Over Time and the Hits Per Second).
Nice and helpful articles on Jmeter. Finally I get to launch the Jmeter. Your articles are very easy to understand and helpful.
ReplyDeleteThanks Much!
Akash
While I'm still not so clear with the results that i am getting in tables and graphs, its like i'm looking at the numbers in table without knowing what they are and why theuare?
ReplyDeletehow to understand them? Please suggest if you have any other tips?