Consecutive Full GCs but no OOM

Thomas Schatzl thomas.schatzl at oracle.com
Fri May 25 17:19:48 UTC 2018


Hi Binoi,

On Fri, 2018-05-25 at 22:35 +0530, Binoy Dalal wrote:
> Thomas,
> Thanks for your response. 
> How did you calculate 4% remaining?
> Is there some error in my calculations because the total amount of
> heap cleared is 679K which is less than 2%(180879.36K) of the total
> heap (9043968K)? Or am I using incorrect parameters while
> calculating?

"Probably the most important flag here would be GCHeapFreeLimit:
simplified, if free space after full gc is below this percentage of
total heap, that full gc does not count against GCOverHeadLimit."

Total heap is the size given by -XX:MaxHeapSize.

I.e. -XX:MaxHeapSize=9663676416 = 9216MB

The total heap after full gc is e.g. 9043968K, i.e. 8832 MB.

1 - 8832/9216 = 4.17%.

Thanks,
  Thomas



More information about the hotspot-gc-use mailing list