Skip to content
Advertisement

Jmeter Injector Heap size

We have a jmeter injector box which uses 32GB heap size for jmeter jvm. When running load tests we noticed a big dip in injecting load when GC activity happens. Anyone experienced this before? Which GC algorithm we can use here??

Advertisement

Answer

Most probably you’re seeing so called Stop-The-World

There are garbage collection algorithms like:

which can work without full stops in incremental way, however this way you might experience lower throughput

In general 32 GB of heap space might be an overkill, as per Optimal Heap Size chapter

If the occupancy of the Java heap is too high, garbage collection occurs frequently. If the occupancy is low, garbage collection is infrequent but lasts longer... Try to keep the memory occupancy of the Java heap between 40% and 70% of the Java heap size… The highest point of occupancy of the Java heap is preferably not above 70% of the maximum heap size, and the average occupancy is between 40% and 70% occupancy. If the occupancy goes over 70%, resize the Java heap

There is no universal recipe, each test is individual and unique and you need to tune JVM parameters for each test separately (just make sure that the tests are still repeatable, to wit use the same JVM configuration for re-running the tests)

More information:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement