V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
zhouhu
V2EX  ›  程序员

G1 收集器在高版本 Java 中优化很大

  •  
  •   zhouhu · 153 天前 · 1336 次点击
    这是一个创建于 153 天前的主题,其中的信息可能已经有所发展或是发生改变。

    看到下面的文章,G1 收集器在高版本 Java 中优化很大。

    https://blogs.oracle.com/javamagazine/post/java-garbage-collectors-evolution

    吞吐量: As you can see, the throughput scores increase significantly simply by moving to later JDK releases. JDK 11 improves by around 5% and JDK 18 by around 18%, respectively, compared to JDK 8

    延迟: 设置最大停顿时间为 200ms As you can see, the throughput scores increase significantly simply by moving to later JDK releases. JDK 11 improves by around 5% and JDK 18 by around 18%, respectively, compared to JDK 8

    设置最大停顿时间为 50ms

    JDK8 200ms JDK11 200ms JDK18 200ms JDK18 50ms
    Average (ms) 124 111 89 44
    P99 (ms) 176 134 104 56
    Relative collection time (%) n/a -15.8 -34.4 +0.06

    内存占用

    With JDK 8, after a short warmup period, G1 native memory usage settles at around 5.8 GB of native memory. JDK 11 improved on that, reducing the native memory footprint to around 4 GB; JDK 17 improved it to around 1.8 GB; and JDK 18 settles at around 1.25 GB of garbage collection native memory usage. This is a reduction of extra memory usage from almost 30% of the Java heap in JDK 8 to around 6% of extra memory usage in JDK 18.

    1. 升级 JDK 版本的 V 友说一下系统性能提升大吗?
    2. 哪里能看到最新的 G1 性能对比?
    1 条回复    2024-07-26 20:21:46 +08:00
    arloor
        1
    arloor  
       153 天前
    强,可惜以后都不写 java 了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5383 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 07:09 · PVG 15:09 · LAX 23:09 · JFK 02:09
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.