Solved

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

Posted on 2014-12-31
4
313 Views
Last Modified: 2015-01-05
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 ?

Thanks
0
Comment
Question by:Anthony Lucia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 28

Assisted Solution

by:dpearson
dpearson earned 250 total points
ID: 40526138
In part it depends on whether you're running 32-bit or 64-bit.

This table should help you figure it out:
http://www.techpaste.com/2012/02/20/default-jvm-settings-gc-jit-java-heap-sizes-xms-xmx-operating-systems/#more-3569

Or here:
http://www.fasterj.com/articles/oraclecollectors1.shtml

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,

Doug
0
 
LVL 62

Assisted Solution

by:gheist
gheist earned 250 total points
ID: 40526515
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.
0
 
LVL 28

Accepted Solution

by:
dpearson earned 250 total points
ID: 40526784
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:
http://www.oracle.com/technetwork/tutorials/tutorials-1876574.html
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.
0
 
LVL 62

Assisted Solution

by:gheist
gheist earned 250 total points
ID: 40526790
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
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to implement Singleton Design Pattern in Java.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question