Gc Strategy: Optavgpause; Gc Strategy: Gencon; Gc Strategy: Balanced - IBM Power7 Optimization And Tuning Manual

Table of Contents

Advertisement

7.4.2 GC strategy: Optavgpause

This strategy prioritizes latency and response time by performing the initial mark phase of GC
concurrently with the execution of the application. The application is halted only for the sweep
and compact phases, minimizing the total time that the application is paused. Performing the
mark phase concurrently with the execution of the application might affect throughput,
because the CPU time that would otherwise go to the application can be diverted to low
priority GC threads to carry out the mark phase. This situation can be acceptable on
machines with many processor cores and relatively few application threads, as idle processor
cores can be put to good use otherwise.

7.4.3 GC strategy: Gencon

This strategy employs a generational GC scheme that attempts to deal with many varying
workloads and memory usage patterns. In addition, gencon also uses concurrent marking to
minimize pause times. The gencon strategy works by dividing the heap into two categories:
New space
Old space
The new space is dedicated to short-lived objects that are created frequently and
unreferenced shortly thereafter. The old space is for long-lived objects that survived long
enough to be promoted from the new space. This GC policy is suited to workloads that have
many short-lived objects, such as transactional workloads, because GC in the new space
(carried out by the
default, up to 25% of the heap is dedicated to the new space. The division between the new
space and the old space can be controlled with the -Xmn option, which specifies the size of the
new space; the remaining space is then designated as the old space. Alternatively, -Xmns and
-Xmnx can be used to set the starting and maximum new space sizes if a non-constant new
space size is wanted. For more information about constant versus non-constant heaps in
general, see 7.4.5, "Optimal heap size" on page 132.
The gencon strategy is the default in the updated Java 6 that uses the V2.6 J9 VM, and in the
later Java 7 version.

7.4.4 GC strategy: Balanced

This strategy evens out pause times across GC operations that are based on the amount of
work that is being generated. This strategy can be affected by object allocation rates, object
survival rates, and fragmentation levels within the heap. This smoothing of pause times is a
best effort rather than a real-time guarantee. A fundamental aspect of the balanced collector's
architecture, which is critical to achieving its goals of reducing the impact of large collection
times, is that it is a region-based garbage collector. A region is a clearly delineated portion of
the Java object heap that categorizes how the associated memory is used and groups related
objects together.
During the JVM startup, the garbage collector divides the heap memory into equal-sized
regions, and these region delineations remain static for the lifetime of the JVM. Regions are
the basic unit of GC and allocation operations. For example, when the heap is expanded or
contracted, the memory that is committed or released corresponds to a number of regions.
scavenger
) is cheaper per object overall than GC in the old space. By
131
Chapter 7. Java

Advertisement

Table of Contents
loading

This manual is also suitable for:

Power7+

Table of Contents