We've been pushing the permgen memory space in our app higher and higher and I'm trying to find out if we have a leak of some sort eating into the permgen area. We don't do hot undeploy/redeploy actions, but we have plenty of proxies, both dynamic and CGLIB-generated. We also do some complicated classloader bits to support various use cases, and I'm suspecting that these might also be a possible contributor to permgen wastage.
So I run jmap -permstat on our running app, hoping to get some insight into what might be filling up our permgen space. (I also run a normal heap dump with both live and dead objects so I can trace down clues that might come from the permstat output).
However, out of the 2400 classloaders listed by jmap permstat, ALL but the bootstrap classloader are listed as "dead". This doesn't make sense, since the app is definitely live, and working.
My understanding was that jmap would report a classloader as "dead" if it were eligible for garbage collection but I must be wrong here...
What am I missing? What does "dead" mean here? Googling around doesn't provide a lot of answers other than the possible misunderstanding that I have here.
Here are a few ideas:
-XX:+UseConcMarkSweepGC
, then make sure you're also using -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With