Pause-less Garbage Collection and Guarded Storage
The Java runtime supports a built-in memory manager that tracks an application’s usage of the Java heap. Garbage Collection (GC) is a process that is triggered when the heap becomes exhausted. During the GC process, the application is stalled in “stop-the-world” phases, to allow GC to identify and reclaim memory from Java objects that are no longer referenced. Untuned, such “stop-the-world” GC phases can have a detrimental impact to your application’s throughput and response time.
Pause-less Garbage Collection (GC) is a new GC mode in the 64-bit IBM SDK for Java, aimed to reduce the impact of GC “stop-the-world” phases, and improve the throughput and consistency of response-times for Java applications. This technology leverages the new Guarded Storage Facility in IBM z14 hardware, to allow more parallel execution of GC-related processing with application code. Pause-less Garbage Collection is particularly relevant for applications with strict response-time Service Level Agreements (SLAs) and/or large Java heaps.
How To Enable
Please see the Requirements section below for the pre-requisite hardware and software levels to support Pause-less Garbage Collection. The Pause-less GC mode is not enabled by default. To enable the new Pause-less GC mode in your application, please introduce -Xgc:concurrentScavenge to the JVM options.
To verify that Pause-less GC is enabled correctly, collect a verbose GC diagnostics with:
java -verbose:gc â€“version
and confirm the following attribute is set to true:
<attribute name=”concurrentScavenger” value=”true” />
- IBM Java 126.96.36.199 (Java 8 SR5) or newer (64-bit)
- IBM z14 with the Guarded Storage Facility enabled
- z/OS 2.3 or z/OS 2.2 with APAR OA51643
- z/VM 6.4 or newer
The pause-less GC mode is currently only available on 64-bit IBM SDK for z/OS.
Linux kernel support has been upstreamed and awaiting Linux distribution adoption.
For more information about Pause-less GC please visit the following:
- Blog: How Concurrent Scavenge using the Guarded Storage Facility Works
- Blog: Reducing Garbage Collection pause times with Concurrent Scavenge and the Guarded Storage Facility
- Article:Java With z14 Features Hardware Facilities for Secure, High-Performance Transaction Processing
Video: What is Guarded Storage? – Interview with Anthony Saporito, STSM, IBM Z hardware development
- Video: Pause-less education (Coming soon)