简体   繁体   English

在没有任何GC活动的情况下清理了JVM内存

[英]JVM memory cleaned up without any GC activity

I am currently running a long running JVM application (that includes groovy classes), and I have observed some strange behaviour. 我目前正在运行一个运行时间很长的JVM应用程序(包括groovy类),我观察到了一些奇怪的行为。

I run the application and update my Groovy classes (correctly cleaning up metaclass info etc - I know there isn't a leak) so I know there are several classes that could be collected from permgen (normally I observe that permgen isn't collected eagerly - i believe it is just full GC that collects permgen, so not unusual for this state). 我运行应用程序并更新我的Groovy类(正确清理元类信息等 - 我知道没有泄漏)所以我知道有几个类可以从permgen收集(通常我观察到permgen不是急切地收集 - 我相信只有完整的GC才能收集permgen,所以这个状态并不罕见)。 The oddity is that if I leave the application running with no activity, after about an hour or so there is a sudden drop in memory usage (heap and permgen, but most pronounced in permgen), but visualvm reports no GC/CPU activity has happened. 奇怪的是,如果我让应用程序在没有活动的情况下运行,大约一个小时左右后内存使用量会突然下降(堆和permgen,但最明显的是permgen),但visualvm报告没有发生GC / CPU活动。

Below is the screenshot of my visualvm logging 下面是我的visualvm日志记录的截图

在此输入图像描述

My question is how is there such a big drop (~80mb) in permgen with no registered GC activity? 我的问题是,在没有注册GC活动的情况下,permgen有如此大的下降(~80mb)? visualvm does normally log GC/CPU activity pretty well. visualvm通常可以很好地记录GC / CPU活动。

Try to install visualgc plugin, to investigate how gc work in this situation. 尝试安装visualgc插件,以调查gc在这种情况下的工作方式。 I guess a lot of new generation object was dropped, but I can't told it by screenshot. 我想很多新一代对象都被删除了,但是我无法通过截图告诉它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM