Java – why does the heap memory usage graph look like this?

I have installed glowroot (Java application monitoring) for my JVM When my application is idle, I get this form of memory heap usage The pattern seems almost uniform Someone can explain and point out my blog post, why does the chart look like that? I am curious.

Solution

It looks like it's because (at least) you're watching it If your application does nothing and no thread makes any allocation, you will get the horizontal line of the heap

However, since you are watching it, there are some things in the JVM that can pass this data back to you This is why you see the ubiquitous sawtooth pattern in many analytical problems Here are some examples

java memory leak,visualvm showing wrong data

visualvm monitors memory usage

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>