wood burning stoves*
The moose likes Performance and the fly likes GC kicking in a bit too regularly...! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "GC kicking in a bit too regularly...!" Watch "GC kicking in a bit too regularly...!" New topic
Author

GC kicking in a bit too regularly...!

steve earl
Greenhorn

Joined: Dec 04, 2001
Posts: 1
Hi all,
A question about garbage collection. We have a server-side application which is tending to run slowly after a period of time before recovering again. My first thoughts are towards tuning the gc parameters. Initially the default parameters were being used (this is on an HP by the way).
I've changed the jvm startup to include the following gc specific parameters:
java -Xincgc -verbose:gc -Xms256m -Xmx256m -Xmn64m
Shown below is the output log for the software over the first few minutes of its life. Can anyone explain why gc appears to be kicking in so often for such small sizes of memory. One explanation (which I haven't yet been able to prove) is that somewhere within the code is an explicit call to System.gc() - which appears to being called quite regularly. Unfortunately the system is running Hotspot v1.0 which doesn't appear to give me the facility to disable explicit calls to System.gc.
Another question I had was that the heap size displayed (the figure in brackets), according to the docs, should be the current capacity of the total heap - in this case I'd expected to see it listed as somewhere near 256Mb. If I remove the Xincgc parameter then it does indeed show close to 256Mb - but with Xincgc included it seems to display the size of the 'new object' heap rather than the size of all the heaps combined.

XSS Thread started: thread number : 1
XSS Thread started: thread number : 2
XSS Thread started: thread number : 3
XSS Thread started: thread number : 4
XSS Thread started: thread number : 5
Unable to load message catalog - mqji
[Full GC 3984K->527K(61952K), 110 ms]
[Full GC 660K->518K(61952K), 100 ms]
[Full GC 1405K->544K(61952K), 110 ms]
[Full GC 1852K->536K(61952K), 130 ms]
[Full GC 651K->531K(61952K), 100 ms]
[Full GC 1398K->556K(61952K), 100 ms]
[Full GC 1430K->529K(61952K), 110 ms]

Well, all help greatly appreciated.
regards,
Steve
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GC kicking in a bit too regularly...!