Faisal Bahadur
Faisal Bahadur

Reputation: 498

Different heap size results on Testing a java server with same input parameters

I am bench marking a java server .I performed the test 5 times for a minute each. The average request send to the server is 1000(every second) on each test. The server is creating 1000 threads on the average on each test. I performed the test 5 times for a minute each. The server is creating 1000 threads on average on each test,but the heap memory footage that i got from jconsole shows me different patterns on every test. Following figure shows that java server is creating 1000 threads on each test but different amount of heap is used on each run although each test is executed with same input parameters. What i am missing here? I did not change the heap or stack size before running the tests. Please help me understand the heap memory my java server is using in different runs. enter image description here

Upvotes: 1

Views: 99

Answers (1)

Dmitri T
Dmitri T

Reputation: 168072

I would recommend using a Profiler tool in order to inspect what objects are in heap in all scenarios and what the differences are, the options are in:

(the latter 2 are non-free)

The differences might be caused by multiple reasons: GC activity, warming up caches, JIT compilation, Java runtime optimization, etc.

A good practice is increasing the load gradually, this way you will allow both JMeter and the application under test to "warm-up". You will also be able to correlate increasing load with other metrics like response time, throughput, number of errors, etc. See JMeter Ramp-Up - The Ultimate Guide article for more details on implementing different load patterns.

Upvotes: 1

Related Questions