Skip to main content

How can I improve performance of 'Old Gen' Garbage collection

1 reply [Last post]
Joined: 2008-12-17

I have a big, active JVM with 20 applications.
The heap is 30GB and the eden:old ratio is default 1:2

The issue is the time spent on Full GC.
In the best case the FGC will take 50 seconds. During busy periods 180 seconds is the average. So far I have the best results using the 'UseParallelOldGC flag but I'm trying to find other ways to reduce the FGC time.

For comparison I am running another machine with a same size heap but only 1 application. It's able to recover almost twice as much memory in half the time.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-11-01

It sounds like you have a serious tuning issue. I have trouble keeping GCs to below 1 ms. ;)
I would check your hardware/memory architecture. If you have a JVM which spans more than one memory bank it will perform significantly slower
You may have a case for splitting your applications into JVMs which fit into one memory bank.
e.g. if you have 4 CPUs you might find that each CPU has its own memory bank which it can access efficiently and it can access other memory banks, but not efficiently. In this case, you want to limit the size of a JVM to less than 1/4 of your memory.
You may improve perform further by locking your JVMs to a single bank of memory. See numactl or similar tool to do this.
Note: if this is the cause its a feature of your hardware not Java.