So far I know that:
- Objects are allocated in the eden space and if they survive a minor collection they get promoted to one of the survivor spaces
- For further minor collections objects' that survive minor collections are swaped between the two survivor spaces. During this objects' individual ages are increasing with each minor collection.
- Objects that reach a specific tenuring threshold are getting promoted to the tenured space (old generation).
- You can set InitialTenuringThreshold (as it says it is 'initial' and not 'min') and MaxTenuringThreshold (MaxValue: 15). Yet the JVM adjusts the actual tenuring threshold (I think every time after a major collection) in respect to the actually used survivor space and desired survivor space.
- The desired space can be altered using the 'TargetSurvivorRatio' JVM parameter and is by default 50% of the max survivor space.
My Questions are:
- In respect to what exactly does the jvm adjusts the actual tenurig threshold.
- What happens with all the object age queues after the jvm changes the actual tenuring threshold. As for example:
- timeStamp1: current actual tenuring which was set by the jvm is 15. There are objects distributed in each age.
- timeStamp2: the jvm has adjusted the actual tenuring threshold to 5. What happens now with all objects with an age of n > 5 from timeStamp1?
Haven't found any documentation on this.