Better understanding of Gen-ZGC promotion algorithm
Evaristo José Camarero
evaristojosec at yahoo.es
Thu Aug 14 12:39:36 UTC 2025
Hi there,
I would appreciate some high-level details about how Gen-ZGCis promoting objects from Young to Old. I can observe in the logs that tenuringthreshold is computed in runtime for every young collection, BUT I am NOT ableto fully understand the strategy.
It looks to me that when allocation rate is higher thetenuring threshold is decreased and objects promotion happens faster (Bothbecause tenuring threshold is lower and because there are more frequent GCcycles). Is that correct? In our logs we observe the tenuring thresholdfluctuating between 1 and 12 (and then Young has Eden + N survivor areas). Myfeeling is that in some situations, object promotion could be a bit aggressiveand reclaiming the memory in the Old Generation will take a while.
Is there any way to influence the promotion algorithm (e.g.guarantee a minimum of GC cycles)? I fully understand the ZGC strategy to avoidtoo much tuning and I agree that strategy is correct, BUT I ask the questionjust in case (I did NOT find anything in the WIKI, JEP or articles,presentations).
A side effect in our case is that we monitor Old Generationsize to take some decisions (e.g. protect new data is provision in theDB...) and in some cases, our system is overreacting.
Thanks in advance,
Evaristo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/zgc-dev/attachments/20250814/6a16294e/attachment.htm>
More information about the zgc-dev
mailing list