• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 323
  • Last Modified:

What is the standard Java Garbage Collection method for Red Hat 6.x

I installed Red hat 6.x, including the default Java that comes with the system

What is the default Garbage Collection method used by this version of Java

How can I double check ?

Anthony Lucia
Anthony Lucia
  • 2
  • 2
4 Solutions
In part it depends on whether you're running 32-bit or 64-bit.

This table should help you figure it out:

Or here:

I'm not aware of any simple way to print it out at the command line.  The first page suggests using
 java -XX:+PrintCommandLineFlags -version
but I think that will only help if RedHat is overriding the default.  Still it may be useful.

Hope that helps,

OpenJDK 6 is more or less a rebuild of open-sourced JDK
So it is safe to assume it is a Hotspot Server VM with G1 garbage collector.
Unless OpenJDK is working with a different version system I don't think G1 is the default in OpenJDK 6.

According to this G1 only came in fully with JDK7u4:
The G1 garbage collector is fully supported in Oracle JDK 7 update 4 and later releases

Even in JDK7 it doesn't default to G1 (at least our CentOS Linux installs) - it's just an available option.
Oh sorry it was called "parallel newgen" for java 1.6
Default is determined on startup. It could be one or other depending on heap size anc CPU number in system.

The "default java" that comes with system is gcj 1.4.2 that uses Boehm GC
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now