GarbageCollector Graph is empty

419 views
Skip to first unread message

eneilsen

unread,
Feb 2, 2012, 7:35:46 PM2/2/12
to javamelody
Using JBoss 5
JavaMelody 1.33
Java 6
Package Structure: ear


When I click on the MBeans I can see the number of collections and the
total time. I even created a simple JSP page:

long count = 0;
for (GarbageCollectorMXBean garbageCollectorMXBean :
ManagementFactory.getGarbageCollectorMXBeans()) {
count += garbageCollectorMXBean.getCollectionCount();

}

And the count was > 0. How come the graph is empty?

Vernat Emeric

unread,
Feb 5, 2012, 5:54:43 AM2/5/12
to javam...@googlegroups.com
Hi,

The garbage collection graph is a percentage of GC time over elapsed
time for each minute, and the value is for all the JVM.
In general, the value of "% GC time" is 0, which shows that the GC is
going well and has no problem to clean the heap in negligible time.
So in fact, it's OK if the GC graph is empty with a mean of 0.

When your server is under load, you may see small spikes in this
graphic. It shows that the GC has had some more work to clean the heap
(for example, 3 seconds over a minute, which is a spike at 5%).
When there are more and more spikes or if some values are over 20% for
example, the GC is near saturation.
You should probably know that, if the GC become saturated, your server
would be unresponsive for many seconds or for minutes (that would be a
problem).

bye,
Emeric


Le 03/02/2012 01:35, eneilsen a �crit :

eneilsen

unread,
Feb 6, 2012, 6:26:44 PM2/6/12
to javamelody
% of time per minute. That's good to know. Does the percentage change
if it's multicore box? For example 3 seconds / 1 min = 5% for a single
core box and 3 seconds / 1 min * 2 cores = 2.5%?

That can easily explain why the graph is pretty much zero - if the
time is 200ms / 60 seconds = .003% it's less then a full percent and
probably won't even register on the graph.
Eric

evernat

unread,
Feb 12, 2012, 6:12:06 AM2/12/12
to javamelody
Hi,

Yes, it is divided by the number of cores.
3 seconds / 60 seconds / 2 cores = 2.5%

bye,
Emeric
Reply all
Reply to author
Forward
0 new messages