while tuning the gc parameter, why do we sometimes want to allow object to age more in the young generation before the objects are moved the old generation? is it because the young generation collector perform better than the old generation collector? or is it more expensive to move the memory from young generation to old generation during gc? thanks.
Major collection typically take longer than minor collections, therefore you want to delay moving objects to the tenured generation as long as possible. By having a high tenuring threshold, there is a greater chance that an object will go out of scope and become unused and be cleaned up by a minor collection.
Of course, if you have objects that expect to survive a long time, then you would really want to move them to the tenured generation as soon as possible. But analysis of heap object has shown that short lived objects vastly outnumber long lived objects, so the preference is to have a high tenuring threshold.