I need my Oracle access point to throw an exception java.lang.OutOfMemoryError: GC overhead limit exceededmuch earlier than with the default options UseGCOverheadLimit.
By default, OOME occurs when more than 98% of the time is spent in the GC and less than 2% of the heap is restored (described http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#par_gc.oom )
For example, I need my JVM to throw OOME when more than 20% of the time is spent on the GC. Unfortunately, -XX:GCTimeRatio=nnit doesn't seem to matter.
The reason I need to configure the JVM in this way is because I am testing my application whether it has a memory leak (for sure, I have a memory leak detection infrastructure where I want to test our application daily) and I donβt need mine JVM to try to free the heap as quickly as possible.
source
share