Measure tomcat Performance with JMeter
Server - Ubuntu

The advantage of using JMeter is that you can use it to create a graph which is visually more appealing to many administrators.  If you wanted to use JMeter on a Linux system you can install it by looking in the repository for the specific distribution.  In this example with Debian 6 it was easily installed on a GUI desktop system.

If you are using Windows to test from there are some examples of installing on a Windows box but I have not installed on Windows so use this information at your own risk.

JMeter can be run in either text mode or graphical mode but the example here is for the graphical mode in order to use the graphing features that many people enjoy.


Graph Results

In order to set up a test right click the "Test Plan" and choose Add/Thread Group.  Set the number of users that you want, here it is set for 149 as tomcat has a default of 150. Drop the "Ramp-Up Period" to "0".  The "Loop Count" is set to 679 in order to achieve around 100,000 requests.

Thread Group

Right click the Thread Group and select Add/Sampler/HTTP Request.  Put in the IP Address of the server you are testing and the port number to test on.  Here you can see that tomcat is the target.  You will also need to set the "Path" which will be determined by which URL you will want to test on.  In the example "/" is selected.

HTTP Request

Right click the Thread Group and choose Add/Listener/Graph Results.

Graph Results

Once that is set then go to File/Save Test Plan and save with a .jmx extension as you see in the example.


Open the file that was saved and select Run/Start to begin the test.