Load testing enterprise applications efficiently (2/3)

Measuring hardware activities

During the load testing of the application, it is also interesting to measure the hardware load and check if we reach the maximum number of concurrent users or if some scenario are consuming too much resources (cpu, disk,…)

Since we are in a windows environment, the best utility to check the OS/hardware activity is Perfmon.
Perfmon is a Ms tool that allows to monitor the system activity.
It also has the the possibility to write the content of system counters in a csv file:

During a test, we launch Perfmon on all computers that participate in a load testing session:

  • Application server
  • Oracle Database
  • Jmeter

The most important variable to monitor are : CPU, disk read bytes, disk write bytes disk queues and network read/write.
The reason to also include the Jmeter server is to make sure our measures will be accurate and Jmeter server has not been saturated (cpu too high, inducing latency in samples).
To launch Perfmon on a remote server, you can either use psExec or logman command line utility.
All data are collected in CSV file and GNUplot can easily display graphs:

The GNUplot script used to generate the above graph:

Measuring JVM activity

The JVM activity can be monitored by adding some flags :

This will generate a file garbage.log containing informations regarding the garbage collection activity:

13.934: [GC 36728K->2824K(1034048K), 0.0123222 secs]
13.947: [Full GC 2824K->2799K(1034048K), 0.0504033 secs]
20.420: [GC 90223K->9323K(1034048K), 0.0242522 secs]
23.745: [GC 96747K->19222K(1034048K), 0.0474630 secs]
24.134: [GC 27168K->20613K(1034048K), 0.0381792 secs]
24.172: [Full GC 20613K->20538K(1034048K), 0.1359290 secs]

An entry like:

13.934: [GC 36728K->2824K(1034048K), 0.0123222 secs]

Means that at 13.9 sec from the jvm startup, memory heap was 36728K and has been garbaged for 0.012 secs. After the garbage, the heap usage was reduced to 2824K.

Using a python script to convert to csv and with the help of GNUplot, we can draw a graph of the JVM activity:

The last part of this article will explain how to combine load testing and visualization tools together to perform a complete simulation.

1 comment to Load testing enterprise applications efficiently (2/3)

Leave a Reply

  

  

  


six − 5 =

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">