Solved

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

Posted on 2014-12-31
4
309 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
  • 2
  • 2
4 Comments
 
LVL 27

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 27

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
collection output issue 9 69
Can't connect to FTP 18 112
Unix Help with:  mailx -s 17 60
Linux 3 39
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

696 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