Java5 -XX:MaxHeapFreeRatio=45 doesn't release heap even when more than 45% of the heap is free

前端 未结 2 1227
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-19 13:40

I have a java application with the arguments below but the heap is not getting reclaimed even when the total free space is greater than 45% (can see via visual VM). Is there

相关标签:
2条回答
  • 2021-01-19 14:04

    We believe we have found an answer to the question. The systems we are running are server class machines with multiple CPUs the JRE was detecting the multiple CPUs and setting the GC to use parallel instead of serial GC which is not compatible with the XX:MaxHeapFreeRatio setting.

    0 讨论(0)
  • 2021-01-19 14:04

    The only GC that gives the memory back my system is the G1GC -XX:+UseG1GC

    0 讨论(0)
提交回复
热议问题