Reputation: 888
I would like to know how much I can increase heapsize in jmeter.bat and in Java for my 64bit Windows 8 OS, 16GB RAM to avoid GC overhead limit exceeded.
Also, can heapsize in jmeter.bat and java be same?
Upvotes: 1
Views: 1712
Reputation: 168092
As per Excessive GC Time and OutOfMemoryError chapter of the Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning article
The concurrent collector will throw an OutOfMemoryError if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown. This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. If necessary, this feature can be disabled by adding the option -XX:-UseGCOverheadLimit to the command line.
The policy is the same as that in the parallel collector, except that time spent performing concurrent collections is not counted toward the 98% time limit. In other words, only collections performed while the application is stopped count toward excessive GC time. Such collections are typically due to a concurrent mode failure or an explicit collection request (e.g., a call to System.gc()).
It usually indicates some problems with your Java application, in your case - with JMeter test.
First of all, make sure you're following recommendations from 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure guide to get the most of your JMeter instance
Try switching to Concurrent Mark Sweep Garbage Collector. In order to use it add the next line to ARGS in JMeter startup script:
-XX:+UseConcMarkSweepGC
If it doesn't help and you're totally sure that your JMeter script and JVM parameters are fine you can turn off this behaviour via aforementioned -XX:-UseGCOverheadLimit
setting
Upvotes: 2