Wednesday Aug 07, 2013

Garbage First Garbage Collector Tuning

A new article, now up on otn/java, titled “Garbage First Garbage Collector Tuning,”
by Monica Beckwith, Principal Member of Technical Staff at Oracle, and performance lead for the Java HotSpot VM's Garbage First Garbage Collector (G1 GC), shows how to adapt and tune the G1 GC for evaluation, analysis, and performance.

As Beckwith explains, the Garbage First Garbage Collector is the low-pause, server-style generational garbage collector for Java HotSpot VM. It uses both concurrent and parallel phases to achieve its target pause time and maintain good throughput. A garbage collector is a memory management tool. When G1 GC determines that a garbage collection is necessary, it first collects the regions with the least live data – known as garbage first.

Beckwith describes the collection phases and marking cycles, lists default tuning devices, offers recommendations about how to fine tune and evaluate garbage collection, and shows how to respond to overflow and exhausted log messages.

She concludes her article as follows:

“G1 GC is a regionalized, parallel-concurrent, incremental garbage collector that provides more predictable pauses compared to other HotSpot GCs. The incremental nature lets G1 GC work with larger heaps and still provide reasonable worst-case response times. The adaptive nature of G1 GC just needs a maximum soft-real time pause-time goal along-with the desired maximum and minimum size for the Java heap on the JVM command line.”

Check it out here.

Thursday Feb 02, 2012

Java Champion Dick Wall on Genetics, the Java Posse, and Alternative Languages (Part One)

In Part One of a two-part interview, titled “Java Champion Dick Wall on Genetics, the Java Posse, and Alternative Languages (Part One),” Java Champion and Java Posse member Dick Wall explores the potential of genetic analysis to enhance human health, shares observations about alternative languages for the Java Virtual Machine (JVM), and reveals inside dope on the Java Posse. Wall admits to learning from Brian Goetz, Java language architect at Oracle, that pretty much everything he thought he knew about optimizing for the JVM was wrong, and discusses not only his current work using Scala to enhance our capacity to gain knowledge of our genetic vulnerabilities, but shares what he has learned about his own genetic challenges. In addition, he recounts some adventures with the Java Posse.

From the interview:

“…when I started working in Scala, I was worried that lots of extra immutable objects, which are created when you use immutable data often, would result in a lot more work for the garbage collector. After talking with Brian about it, I realized that, in fact, the opposite is often or usually true. Short-lived, immutable objects usually exist in a special part of the JVM’s memory referred to as Eden. Releasing the memory back to the pool from there is almost without cost. It is only longer-lived objects that get promoted to the JVM main heap that are expensive to garbage collect. So lots of small, short-lived objects can actually help the garbage collector out. There are other ways immutability can help or hurt performance, but ultimately, I decided to code for style and correctness first and worry about performance if and when it becomes an issue.”

Read the interview here.


Insider News from the Java Team at Oracle!

javeone logo


« April 2014