Reputation: 4605
In our product, we are using Java (1.6.0_45 32 bit) + Tomcat (6.0.18) + Jersey (1.18). We are observing that the loaded class count (java.lang:type=ClassLoading:LoadedClassCount
) is continuously increasing over days (1000K + in 1 day under traffic), but the java.lang:type=ClassLoading:UnloadedClassCount
remains constant to a very low value (around 30). We have captured multiple heap dumps (jmap -F -dump:live,format=b,file=<file_name.hprof> <process_id>
) as well as permgen dumps (jmap -permstat <process_id>
). Both indicates that the number of classes to be around 7K where as per JConsole, it's 1000K+. Moreover, when we enabled class loading and unloading logging, we are seeing huge number of classes being loaded (This may match with the 1000K+ count) and very few classes being unloaded.
Here is the possible reason for the higher number of classes loaded. However, my question is why there is a difference between JMX count and heap/permgen dump?
Upvotes: 1
Views: 1066