JStress: Getting StartedLoad Profiling a Web Server or Web ApplicationTo get a profile of how a web application performs under various loads, we want to incrementally increase the arrival rate until we get to a point where the server is effectively at 100% utilization, and requests are starting to be queued. This point is where the request arrival rate is just greater than the request departure rate (or throughput). When we reach this point, we can calculate the number of resource in the system that can concurrently process requests. In theory a 2 cpu server would equate to 2 resource handlers, but I/O bottlenecks and other blocking will reduce this. Start by unpacking the JStress distribution archive, and opening a prompt in the If you have an URL you want to test, put it in a file called Next we need to set the start and stop rates for the profile. Change the values of the following properties
in the jstress.LinearStepRun.IntervalStart=100 jstress.LinearStepRun.IntervalEnd=10Then on the command line, execute: ../bin/jstress jstress.load.LoadURLTask LinearStepRun If you don't have an URL to test, from the command line (without making any changes to
../bin/jstress jstress.load.LoadIndependentTask LinearStepRun On the screen you will see various metrics printed out, these same values are also being stored in the When JStress completes, execute: r CMD BATCH r/plot.rThis will drop a pdf graph to the current directory profiling various statistics about your server. It will look similiar to the graph below.
The line marked Note that your graph may not be as pretty as the one above, so you may need to tweak the properties file for a smoother profile (smaller step increments, or longer increment duration), or play around with the R settings. You can also narrow the start and end times to reduce the time it takes to execute the test. If you want a mix of requests, you can add as many URLs to the |
Updated: $Date: 2007/09/11 $ $Author: cwensel $