From lsc1943 at gmail.com Tue Aug 5 01:59:43 2025 From: lsc1943 at gmail.com (Jack Ling) Date: Tue, 5 Aug 2025 09:59:43 +0800 Subject: JDK21/24 ZGC Generational Extra Performance Overhead Message-ID: Hello ZGC team, Recently we planned to upgrade JDK Our application is a Netty based gateway to route HTTP requests from ALB to upstream application servers. During the performance tests, we observed if using ZGC generational, it will cause extra 10% CPU overhead and the overall capacity was decreased 10% -15% which was a huge degradation. Unfortunately the normal ZGC was disabled in JDK 24. Attached JDK 21 and JDK 24 gc logs under the same workload, we could observe much more concurrent time cost when using ZGC generational. Would you help to advise what's the cause for the extra overhead using ZGC generational and how to optimize, thank you! -- Best Regards! Jack Ling -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: gclogs.zip Type: application/zip Size: 533748 bytes Desc: not available URL: From evaristojosec at yahoo.es Thu Aug 14 12:39:36 2025 From: evaristojosec at yahoo.es (=?UTF-8?Q?Evaristo_Jos=C3=A9_Camarero?=) Date: Thu, 14 Aug 2025 12:39:36 +0000 (UTC) Subject: Better understanding of Gen-ZGC promotion algorithm References: <305351824.4227898.1755175176145.ref@mail.yahoo.com> Message-ID: <305351824.4227898.1755175176145@mail.yahoo.com> 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: