1

According to this page (http://www.oracle.com/technetwork/java/javase/tech/g1-intro-jsp-135488.html) the Garbage-First (G1) garbage collector is fully supported in Oracle JDK 7 update 4 and later releases. I was wondering if anybody knows what the status is for JDK 6? Is this fully supported in the most recent release (1.6.0_45) or it's still considered an experimental feature?

mhdwrk
  • 1,745
  • 2
  • 13
  • 19

1 Answers1

0

The Java Performance book says that G1 was first available in Java 6u20. I think you can safely use G1 with Java 6u40 in production environment.

Of course, there can be small performance/usage differences in G1 between Java6u40 and Java 7u4 but there is such difference almost between every release.

Aleš
  • 8,896
  • 8
  • 62
  • 107
  • Here is a snippet from the release note for 6u25 (hotspot vm 20): "The Garbage First (G1) garbage collector continues to advance with Java SE 6u25, although it remains an experimental option." Because of this note and the fact that the next version (21) of the hotspot VM was introduced in JDK7, I'm not sure G1 has ever got past the experimental stage in JDK6. Am I missing something here? – mhdwrk Jul 04 '13 at 05:10
  • I am not saying that it is not marked as "experimental option". But, Hostpot marks all new features as experimental at first and most of them are already in the stage where they can be used in production. The fact that G1 is fully supported in JDK7 means that it was stable enough in the JDK6. – Aleš Jul 05 '13 at 20:07
  • Anyway, what do you mean by "fully supported"? Do you mean the technical Oracle support of this feature? Functionally, G1 is fully functional in JDK6u20 and higher. – Aleš Jul 05 '13 at 20:08
  • "fully supported" is the term used by Oracle in the above mentioned link and I myself am trying to figure out what that exactly means. – mhdwrk Jul 06 '13 at 17:17
  • FYI: I tried "jmap -heap" on a java 6 process using G1 and got following exception: Caused by: java.lang.RuntimeException: unknown heap type : class sun.jvm.hotspot.gc_interface.CollectedHeap at sun.jvm.hotspot.tools.HeapSummary.run(HeapSummary.java:122) at sun.jvm.hotspot.tools.Tool.start(Tool.java:221) at sun.jvm.hotspot.tools.HeapSummary.main(HeapSummary.java:39) – mhdwrk Jul 06 '13 at 17:19