Go to main content
1/14
Contents
Title and Copyright Information
Preface
Audience
Documentation Accessibility
Related Documents
Conventions
1
Introduction to Garbage Collection Tuning
What Is a Garbage Collector?
Why Does the Choice of Garbage Collector Matter?
Supported Operating Systems in Documentation
2
Ergonomics
Garbage Collector, Heap, and Runtime Compiler Default Selections
Behavior-Based Tuning
Maximum Pause-Time Goal
Throughput Goal
Footprint
Tuning Strategy
3
Garbage Collector Implementation
Generational Garbage Collection
Generations
Performance Considerations
Throughput and Footprint Measurement
4
Factors Affecting Garbage Collection Performance
Total Heap
Heap Options Affecting Generation Size
Default Option Values for Heap Size
Conserving Dynamic Footprint by Minimizing Java Heap Size
The Young Generation
Young Generation Size Options
Survivor Space Sizing
5
Available Collectors
Serial Collector
Parallel Collector
The Mostly Concurrent Collectors
Selecting a Collector
6
The Parallel Collector
Number of Parallel Collector Garbage Collector Threads
Arrangement of Generations in Parallel Collectors
Parallel Collector Ergonomics
Options to Specify Parallel Collector Behaviors
Priority of Parallel Collector Goals
Parallel Collector Generation Size Adjustments
Parallel Collector Default Heap Size
Specification of Parallel Collector Initial and Maximum Heap Sizes
Excessive Parallel Collector Time and OutOfMemoryError
Parallel Collector Measurements
7
The Mostly Concurrent Collectors
Overhead of Mostly Concurrent Collectors
8
Concurrent Mark Sweep (CMS) Collector
Concurrent Mark Sweep Collector Performance and Structure
Concurrent Mode Failure
Excessive GC Time and OutOfMemoryError
Concurrent Mark Sweep Collector and Floating Garbage
Concurrent Mark Sweep Collector Pauses
Concurrent Mark Sweep Collector Concurrent Phases
Starting a Concurrent Collection Cycle
Scheduling Pauses
Concurrent Mark Sweep Collector Measurements
9
Garbage-First Garbage Collector
Introduction to Garbage-First Garbage Collector
Enabling G1
Basic Concepts
Heap Layout
Garbage Collection Cycle
Garbage-First Internals
Determining Initiating Heap Occupancy
Marking
Behavior in Very Tight Heap Situations
Humongous Objects
Young-Only Phase Generation Sizing
Space-Reclamation Phase Generation Sizing
Ergonomic Defaults for G1 GC
Comparison to Other Collectors
10
Garbage-First Garbage Collector Tuning
General Recommendations for G1
Moving to G1 from Other Collectors
Improving G1 Performance
Observing Full Garbage Collections
Humongous Object Fragmentation
Tuning for Latency
Unusual System or Real-Time Usage
Reference Object Processing Takes Too Long
Young-Only Collections Take Too Long
Mixed Collections Take Too Long
High Update RS and Scan RS Times
Tuning for Throughput
Tuning for Heap Size
Tunable Defaults
11
Other Considerations
Finalization and Weak, Soft, and Phantom References
Explicit Garbage Collection
Soft References
Class Metadata
Scripting on this page enhances content navigation, but does not change the content in any way.