0
votes

I'm currently load testing a system using Apache JMeter. I am interested in JVM properties, so I added a script to the server -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:"FILE_DESTINATION" to get such informations.

I have three thread groups: 100, 500 and 1000 concurrent users.

1) I would like to know if it is a good idea deleting the content of the log file after each group execution or not, so each log reflects the JVM statistics of that group?

2) Is there a needed interval between one thread group execution and another ?

Thanks !

2

2 Answers

0
votes
  1. I would recommend restarting JVM between test executions, this way you will get more "clean" results without impact of previous tests
  2. I believe point 1 answers your question. One tip: define reasonable ramp-up period in the Thread Group(s) so the load could increase gradually. This way you will be able to correlate main KPIs with the increasing load. It is also a good idea to apply the same approach for ramp-down, this way you will be able to check if/how application recovers after the stress load.

You may also find Perfmon Metrics Collector useful, it is capable of collecting and plotting GC time and other JMX metrics so you will get this information along with test results.

JMeter JMX PerfMon

Check out How to Monitor Your Server Health & Performance During a JMeter Load Test article for more details.

0
votes

If you are using tomcat , add below content to setenv.sh file

-verbose:gc\
  -XX:+PrintGCTimeStamps\
  -XX:+PrintGCDateStamps\
  -XX:+PrintGCDetails\
  -XX:+PrintGC\
  -Xloggc:logs/gc-api.log\
  #-XX:+PrintTenuringDistribution\  #optional 
  #-XX:+PrintGCApplicationStoppedTime\   #optional