This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
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.