Are ratios between spaces/generations in the Java Heap constant?

前端 未结 3 422
离开以前
离开以前 2020-12-24 10:29

I have read this article about virtual machine garbage collection tuning to understand the java garbage collector better. Each space has a Virtual heap space area

3条回答
  •  佛祖请我去吃肉
    2020-12-24 10:56

    Edit: I think I may have something wrong. Putting this note here while I investigate, to keep from sending folks down the wrong path!

    Ales0x's answer is great if you are using Parallel Scavenge GC (-XX:+UseParallelGC), but Concurrent Mark-Sweep GC (-XX:+UseConcMarkSweepGC) does not support adaptive sizing.

    With Concurrent Mark-Sweep, the new/young generation size is set based on the initial heap size (unless you specify -XX:NewSize=). The new generation size will not change as the heap grows.

提交回复
热议问题