Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default threshold for moving an object from Young generation to Old Generation

In java what is default threshold for young generation object to move to old generation. I mean how many GC an object need to survive so that it can be moved to old or tenured generation area of heap.

like image 746
himansh singh Avatar asked Oct 16 '25 21:10

himansh singh


1 Answers

The option is called -XX:MaxTenuringThreshold.

Docs say, the default value is 15 for G1 and parallel collector and is 4 for CMS (source).

like image 52
AdamSkywalker Avatar answered Oct 18 '25 09:10

AdamSkywalker