• Post Reply Bookmark Topic Watch Topic
  • New Topic

GC kicking in a bit too regularly...!  RSS feed

steve earl
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!