Categories
Tech

Assigning JMeter the Right Amount of Memory

This article is a quick overview of what I think the ideal limit for the Java Virtual Machine heap size should be in JMeter.


It depends what sort of systems and protocols you are running load tests against but typically the heap size should be a comfortable 512-1024M.

My team ran in to problems which we originally thought were performance related but turned out to be JVM heap size issues on the load injector.

Further diagnostics showed that the heap size we originally set (> 5GB as the load injector box was very big) was too much for JMeter to manage effectively.

The only logical explanation I can think of as to why more memory would cause a detrimental impact on JMeter is that more CPU cycles are spent trying to manage this large amount of memory instead of actually using it efficiently.

Therefore I suggest setting a comfortable 512-1024M and not something ridiculously over the top like 8GB.