How do I tune the JVM for Garbage Collection?

(Doc ID 1039123.1)

Last updated on JULY 08, 2016

Applies to:

Oracle Knowledge - Version 8.0.x and later
Information in this document applies to any platform.

Symptoms

How do I tune the JVM for Garbage Collection?  If you are getting a lot of full GCs then you may need to look at the product and how it is sized.  This is generally a professional services activity and not a support activity as there are many factors that go into this discussion including growth of the system.

Changes

Here are some areas for investigation depending on the type of instance having the issue.

The “OutOfMemoryError: GC overhead limit exceeded” is the JVM giving up performing GC because it knows it is unable to free up enough JVM heap for the requested Java object allocation.  

Has the search index grown over time?

Has the number of search requests increased?

How many CPUs does this server have?

How many processes total are running on this server?

The documentation recommends to 2 CPUs for reach application instance.   Check the CPU usuage and if it is high this could also be a cause.  Check that the instance has enough CPU cycles?

If this is on Linux use the ‘free -m’ utility.  Verify the actual free memory and available swap space.  If there is an additional 1200M available have the customer increase the –mx parameter to 3800m while removing the "-XX:+UseParallelGC" along with any other suggested JVM parameter.  It is possible that over time the runtime’s mature running size has increased due to load and the size of the index. See if the increased heap resolves these Full GCs.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms