GCPerformance.java - Program Output

This section describes output data generated by the GC tuning test program - GCPerformance.java.

Before we do any GC performance tests with the GCPerformance.java, let's run it with no wait time and no warmup to review its output:

herong> javac GCPerformance.java

herong> java GCPerformance 1024 32 64 0 0

Parameters: Size=1024KB, Base=32, Chunk=64, Wait=0ms, Warmup=0
Real:Exec  Lat.     Throughput      Total:Free  Proc.
Time:Time  ms/o  Ave:Min:Max:Chunk   Mem.:Mem.   Obj.
  88:88    1375  727:727:727:727   909312:711400   64
           ----              -----               ----
           |                 |                   |- 64 obj. processed
           |                 |- Throughput: 727 objects per second
           |- Latency: 1375 ms per 1000 objects

 143:143  1375  895:727:1163:1163  601088:403076  128
 163:163  1375  1177:727:3200:3200  505856:307832  192
 199:199  1375  1286:727:3200:1777  580608:382614  256
          ----  ----
          |     |- Ave. throughput: 1917 objects per second
          |- Latency: 1375 ms per 1000 objects
...

Note that you may get an "ArithmeticException: / by zero", if you use a low object size and chunk size. For example:

herong> java GCPerformance 1024 32 32 0 0

Parameters: Size=1024KB, Base=32, Chunk=32, Wait=0ms, Warmup=0
Real:Exec  Lat.     Throughput      Total:Free  Proc.
Time:Time  ms/o  Ave:Min:Max:Chunk   Mem.:Mem.   Obj.
47:47  1470  680:680:680:680  362496:230119  32
78:78  1470  820:680:1032:1032  362496:230022  64
93:93  1470  1032:680:2133:2133  362496:230009  96
Exception in thread "main" java.lang.ArithmeticException: / by zero
        at GCPerformance.myTest(GCPerformance.java:61)
        at GCPerformance.main(GCPerformance.java:21)

Descriptions on output columns:

For this running session, the application performance is:

Throughput: 399 objects per seconds
Latency:    3906 milliseconds per 1000 objects

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"

 The Z Garbage Collector (ZGC) - "+XX:+UseZGC"

 Object References and Garbage Collection

Garbage Collection Performance Test Program

 GCPerformance.java - GC Performance Test Program

GCPerformance.java - Program Output

 Performance Impact of Wait Time

 Performance Impact of Object Size

 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

 GCPerfP99V2.java - Percentile Performance with Load

 GCPerfP99V2.java - Work Load Level

 GCPerfP99V2.java - Object Number and Size

 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

 References

 Full Version in PDF/EPUB