Solved

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

Posted on 2014-12-31
4
299 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 26

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 61

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 26

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 61

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This video teaches viewers about errors in exception handling.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now