I used to wonder why young generation (eden+survivors) should not be larger than ¼ (or 1/8….can’t remember the recommendation). The reason turns out to be fundamental and it’s good to remember it.
Reason is, minor GC is very frequent and is expected to be efficient and “cheap”. Long pause is associated with major GC, whereas minor GC STW pause is usually much shorter.
Note Even though minor GC is brief, it is Stop-The-World throughout. There are no phases. There’s just one phase and it’s STW.
Many financial trading engines incur just one major GC a day, but no such thing about minor GC.
General advice/observations —
* young gen too large -> bad pause during minor GC
* young gen too small -> too frequent minor GC