You can enable/disable special GC policy that limits time spent by JVM on GC before OutOfMemoryError is thrown with:
Will disable this option for JVM:
Enables the use of a policy that limits the proportion of time spent by the JVM on GC before an OutOfMemoryError exception is thrown. This option is enabled, by default, and the parallel GC will throw an OutOfMemoryError if more than 98% of the total time is spent on garbage collection and less than 2% of the heap is recovered. When the heap is small, this feature can be used to prevent applications from running for long periods of time with little or no progress. To disable this option, specify the option -XX:-UseGCOverheadLimit.
Default value is true
TODO link UseG1GC, MinHeapFreeRatio, MaxHeapFreeRatio, Xmx, Xms, UseSerialGC, USeParNewGC, UseParallelGC, UseZGC
If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.
Edit your Comment