为什么堆内存使用情况图如下所示? [英] Why does heap memory usage graph look like this?

查看:63
本文介绍了为什么堆内存使用情况图如下所示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的JVM中安装了glowroot(Java应用程序监视).当我的应用程序空闲时,我会得到这种形式的内存堆使用情况图.图案似乎几乎是均匀的.有人可以解释一下,为什么我将我指向任何有关该图为什么看起来如此的博客文章?我好奇.

I have install glowroot (java application monitoring) to my JVM. When my application idles, I get this kind graph formation of memory heap usage. The pattern seems almost uniform. Could someone please explain and point me to whatever blog post on why does the graph looks like that? I am curious.

推荐答案

大规模的锯齿模式表示GC周期之间的内存利用率.应用程序将稳定地分配对象(向上倾斜的线),直到堆足够满以使VM决定运行GC(该点)为止.然后,GC回收了大量垃圾(陡峭的水滴),然后重新开始该过程.

The large-scale sawtooth pattern represents the memory utilization between GC cycles. The application is allocating objects steadily (the upsloping line) until the heap gets full enough for the VM to decide to run the GC (the point). Then the GC reclaims a large amount of garbage (the steep drop) and the process starts again.

短短的尖峰上下很难理解.向上的尖峰很可能代表(短寿命对象的)异常大"分配,从而触发了年轻的发电周期.向下的峰值可能表示响应内存压力"而释放了缓存的对象.

The short spikes up and down are harder to understand. It is possible that the upward spikes represent anomalous "large" allocations (of short life-time objects) that are triggering a young generation cycle. The downward spikes might represent cached objects being freed in response to "memory pressure".

如果您想更好地了解峰值,则需要查看GC日志消息,并尝试将它们与图形相关联.

If you want a better understanding of the spikes, you need to look at the GC log messages, and try to correlate them with the graphs.

这篇关于为什么堆内存使用情况图如下所示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆