performance - why old generation takes more space than young generation -
someone said old generation takes more space young generation in java virtual machine, right? have not found article topic on internet.
any highly appreciated!
the ratio between size of generations in jvm trade-off between different factors.
see “non-standard options” of java
launcher tool:
-xmnsize
sets initial , maximum size (in bytes) of heap young generation (nursery). …
the young generation region of heap used new objects. gc performed in region more in other regions. if size young generation small, lot of minor garbage collections performed. if size large, full garbage collections performed, can take long time complete. oracle recommends keep size young generation between half , quarter of overall heap size.
so ratio not fixed tunable. doesn’t have constant, can set minimum , maximum sizes young generation using -xx:newsize
, resp. -xx:maxnewsize
. recommendation indeed have young generation smaller old generation , expect default values follow it.
Comments
Post a Comment