Garbage Collection Performance Test Program
This chapter provides tutorial notes and example codes on garbage collection performance test programs. Topics include throughput performance calculation; latency performance calculation; operating system interruptions; P99 (99th Percentile) performance; running JVM with highest priority.
GCPerformance.java - GC Performance Test Program
GCPerformance.java - Program Output
Performance Impact of Wait Time
Performance Impact of Chunk Size
Performance Jumps Not Related to GC
Performance Test and System Interruptions
"START /REALTIME" - Run JVM with Highest Priority
GCPerfP99.java - 99th Percentile Performance
GCPerfP99.java - Output Verification
- Object allocation and release can be simulated with a simple simulation
program GCPerformance.java for garbage collection testing.
- The throughput performance can be defined as
the average number of tasks can be performed in a given period of time.
- The latency performance can be defined as the longest time it takes
to perform a task.
- The task of the test program is defined as a single new object
being created and added to the linked list, and a single old object being
removed from the linked list.
- For some unknown reason, throughput performance jumps
in some test runs. When using chunk size of 16 objects and 1024K per object,
those jumps show 2 times of normal performance.
- Performance measurement is more accurate if we take the 99th percentile
(P99) best samples to reduce the impact of operating system interruptions.
- On Windows systems, we can use "START /REALTIME" command to run
JVM with the highest priority to minimize system interruptions.
Table of Contents
About This Book
Heap Memory Area and Size Control
JVM Garbage Collection Logging
Introduction of Garbage Collectors
Serial Collector - "+XX:+UseSerialGC"
Parallel Collector - "+XX:+UseParallelGC"
Concurrent Mark-Sweep (CMS) Collector - "+XX:+UseConcMarkSweepGC"
Garbage First (G1) Collector - "+XX:+UseG1GC"
Object References and Garbage Collection
►Garbage Collection Performance Test Program
Performance Tests on Serial Collector
Performance Tests on Parallel collector
Performance Tests on Concurrent collector
Performance Tests on G1 collector
Garbage Collection Performance Test Summary
Full Version in PDF/EPUB