9

GC 疑难情况问题排查与分析(上篇)

 3 years ago
source link: https://kimmking.blog.csdn.net/article/details/108728951
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

本章介绍导致 GC 性能问题的典型情况。相关示例都来源于生产环境,为演示需要做了一定程度的精简。

名词说明:Allocation Rate,翻译为“分配速率”,而不是分配率。因为不是百分比,而是单位时间内分配的量。同理,Promotion Rate 翻译为“提升速率”。

高分配速率(High Allocation Rate)

分配速率(Allocation Rate)表示单位时间内分配的内存量。通常使用 MB/sec 作为单位,也可以使用 PB/year 等。分配速率过高就会严重影响程序的性能,在 JVM 中可能会导致巨大的 GC 开销。

如何测量分配速率?

通过指定 JVM 参数:-XX:+PrintGCDetails -XX:+PrintGCTimeStamps,通过 GC 日志来计算分配速率。GC 日志如下所示:


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK