Frage

I am running a Java application in JBoss which periodically undertakes a memory-intensive task. The amount of memory used by org.jboss.Main rises during this time, but does not fall once the task is completed. I've been profiling the process using VisualVM and have forced a garbage collection. The memory used by org.jboss.Main remains at about 1GB. The basic info of the heap dump is as follows.

Total bytes: 53,795,695
Total classes: 5,696
Total instances: 732,292
Classloaders: 324
GC roots: 2,540
Number of objects pending for finalization: 0

I've also looked at the classes using the memory and found that char[] accounts for most of the memory.

Could anyone tell me why VisualVM shows 20 times less memory being used by JBoss than my activity monitor? And if anyone could provide any advice or directions to further reading on how to get JBoss to release memory after the job is complete that would be greatly appreciated.

War es hilfreich?

Lösung

VisualVM is showing the size of the heap after a Full GC. This is the amount of data you can use before the heap has to grow.

The heap dump is showing you how much of the heap is used at present.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top