"START /REALTIME" - Run JVM with Highest Priority

This section provides a tutorial showing how to use 'START /REALTIME' command to run JVM with highest priority on Windows systems.

Another way to minimize system interruptions is to use the "START /REALTIME" command to launch JVM on Windows systems. It will run the JVM with highest priority, like running JVM in real-time without any system interruptions.

Let's try this by starting the JVM to run the application, waiting for few seconds, then starting Chrome on your computer while the JVM is running.

C:\herong>start /realtime \progra~1\java\jdk1.8.0\bin\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.
93:93  2906  344:344:344:344  136776:70251  32
187:187  2941  342:340:344:340  136776:37496  64
296:296  3412  324:293:344:293  156572:90789  96
359:359  3412  356:293:507:507  156572:57183  128
421:421  3412  380:293:516:516  156572:24409  160
...
1872:1872  3412  393:293:516:507  156572:24403  736
1997:1997  3906  384:256:516:256  156572:89941  768
...
5772:5772  3906  382:256:680:293  156572:57172  2208
5928:5928  4878  377:205:680:205  156572:89941  2240
                             ---
          System interruption -|
6021:6021  4878  377:205:680:344  156572:57171  2272
6132:6132  4878  375:205:680:288  156572:24403  2304
6272:6272  4878  372:205:680:228  156572:89941  2336
6380:6380  4878  371:205:680:296  156572:57172  2368
6523:6523  4878  367:205:680:223  156572:89941  2400
6613:6613  4878  367:205:680:355  156572:57172  2432
6724:6724  4878  366:205:680:288  156572:24403  2464
6865:6865  4878  363:205:680:226  156572:89941  2496
6973:6973  4878  362:205:680:296  156572:57171  2528
7074:7074  4878  361:205:680:316  156572:89941  2560
7154:7154  4878  362:205:680:400  156572:57172  2592
...

As you can see from the output, the longest system interruption is shorter now. The reported throughput dropped from about 400 objects/second to about 200 objects/second.

If we let the JVM run with the highest priority without touch the computer, the performance measurement will be more accurate now. See one example below:

C:\herong>start /realtime \progra~1\java\jdk1.8.0\bin\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.
78:78  2439  410:410:410:410  136776:70251  32
172:172  2941  372:340:410:340  136776:37496  64
281:281  3412  341:293:410:293  156572:90789  96
344:344  3412  372:293:507:507  156572:57183  128
422:422  3412  379:293:507:410  156572:24409  160
...
12482:12482  3448  399:290:695:410  156572:57173  4992
12576:12576  3448  399:290:695:340  156572:89941  5024
12638:12638  3448  400:290:695:516  156572:58019  5056
12701:12701  3448  400:290:695:507  156572:24403  5088
...

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