Tag ‘G1’

G1 Garbage Collector is mature in Java 9, finally

The G1 garbage collector is the default collector in Java 9. So it is time to reevaluate its performance which in 2013 I had criticized in a previous blog article that compared G1’s performance in late Java 7 and early Java 8 to the traditional collectors. The improvements achieved in the meantime indeed are very impressive as I will show in this article.

Read the rest of this entry »  |   Share

Controlling GC pauses with the GarbageFirst Collector

In the previous post I have shown that the GarbageFirst (G1) collector in Java 7 (and also 8ea) does a reasonable job but cannot reach the GC throughput of the “classic” collectors as soon as old generation collections come about. This article focuses on G1’s ability to control the duration of GC pauses. To this end, I refined my benchmark from the previous tests and also ran it with a huge heap size of 50 GB for which G1 was designed. I learnt that G1’s control of GC pauses is not only costly but, unfortunately, also weaker than expected.

Read the rest of this entry »  |   Share

Benchmarking G1 and other Java 7 Garbage Collectors

As mentioned in a first post of this series, Oracle’s GarbageFirst (G1) collector has been a supported option in Java 7 for some time. This post examines in more detail the performance of the G1 garbage collector compared to the other collectors available in the Hotspot JVM. I used benchmark tests for this purpose instead of a real application because they can be executed and modified more easily. I found surprising strengths and weaknesses in several of Hotspot’s garbage collectors and even disclose a fully-fledged bug.

Read the rest of this entry »  |   Share