java - Why is old generation bad? -


an object can copied between survivor spaces 7 times before relocated old generation space , understand object has every chance of being garbage collected before being put old generation space. lecture listening states avoid object promotion young generation space old generation space.

my question why promotion old generation bad? lecture doesn't explain that.

why old generation bad?

the lecture listening states avoid object promotion young generation space old generation space.

it's not promotion old generation bad in general. it's bad when objects short lifetime promoted accident.

you want long-lived objects in old generation not interfere minor collections.

allocation rates inverse object lifetimes (which gives rise weak generational hypothesis). in means short-lived objects generated @ high rate. , in turn means: if short-lived objects promoted old gen old gen filled @ high rate.

minor gcs less expensive major gcs, in terms of pause times, why want run latter less often.

with cms , g1 have distinguish further. try collect old generation in partially concurrent manner - , in small chunks in g1's case - fall on full stop-the-world gc if meet failure cases or cannot keep promotion rates.

basically promoting many short-lived objects fast violates weak generational hypothesis around gcs constructed.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -