JVM Tutorials - Herong's Tutorial Examples - Version 4.23, by Dr. Herong Yang
441/400/40MB Test on JRockit 28.2
This section provides a tutorial example on running GCTest2.java on JRockit 28.2.7 with 441MB memory limit and a 400MB base plus 40MB fluctuating memory usage with object size of 1.25MB. 1 extra MB is enough for the GC to work.
From the previous tutorial, we learned that JRockit GC behaves better than HotSpot with low free memory. In this tutorial, I want to how low it can go with HotSpot R28.2.7 on my Windows 7 system:
>\Progra~1\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\javac GCTest2.java >\Progra~1\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\java -Xmx441m GCTest2 Test parameters: Object size: 1280KB Initial objects and data size: 320, 409600KB Added objects and data size: 32, 40960KB Time Total Free Used Free Total Act. Dead Over sec. Mem. Mem. Mem. %. Obj. Obj. Obj. Head 1 451584 790 450794 0% 450560 409600 40960 234 3 451584 790 450794 0% 450560 409600 40960 234 4 451584 790 450794 0% 450560 409600 40960 234 5 451584 792 450792 0% 450560 409600 40960 232 6 451584 792 450792 0% 450560 409600 40960 232 7 451584 792 450792 0% 450560 409600 40960 232 8 451584 792 450792 0% 450560 409600 40960 232 10 451584 792 450792 0% 450560 409600 40960 232 11 451584 792 450792 0% 450560 409600 40960 232 12 451584 790 450794 0% 450560 409600 40960 234 13 451584 790 450794 0% 450560 409600 40960 234 14 451584 791 450793 0% 450560 409600 40960 233 15 451584 790 450794 0% 450560 409600 40960 234 17 451584 790 450794 0% 450560 409600 40960 234 18 451584 792 450792 0% 450560 409600 40960 232 19 451584 792 450792 0% 450560 409600 40960 232 20 451584 790 450794 0% 450560 409600 40960 234 21 451584 790 450794 0% 450560 409600 40960 234 23 451584 790 450794 0% 450560 409600 40960 234 24 451584 792 450792 0% 450560 409600 40960 232 25 451584 790 450794 0% 450560 409600 40960 234 26 451584 790 450794 0% 450560 409600 40960 234 27 451584 791 450793 0% 450560 409600 40960 233 29 451584 790 450794 0% 450560 409600 40960 234 30 451584 790 450794 0% 450560 409600 40960 234 31 451584 792 450792 0% 450560 409600 40960 232 32 451584 792 450792 0% 450560 409600 40960 232 33 451584 790 450794 0% 450560 409600 40960 234 35 451584 790 450794 0% 450560 409600 40960 234 36 451584 792 450792 0% 450560 409600 40960 232 37 451584 792 450792 0% 450560 409600 40960 232 38 451584 790 450794 0% 450560 409600 40960 234 39 451584 790 450794 0% 450560 409600 40960 234 41 451584 792 450792 0% 450560 409600 40960 232 42 451584 790 450794 0% 450560 409600 40960 234 43 451584 790 450794 0% 450560 409600 40960 234 44 451584 792 450792 0% 450560 409600 40960 232 45 451584 792 450792 0% 450560 409600 40960 232 47 451584 790 450794 0% 450560 409600 40960 234 48 451584 790 450794 0% 450560 409600 40960 234 49 451584 790 450794 0% 450560 409600 40960 234 50 451584 792 450792 0% 450560 409600 40960 232 51 451584 792 450792 0% 450560 409600 40960 232 ... 380 451584 790 450794 0% 450560 409600 40960 234 381 451584 792 450792 0% 450560 409600 40960 232 382 451584 790 450794 0% 450560 409600 40960 234 384 451584 792 450792 0% 450560 409600 40960 232 ...
The result is very impressive. JRockit JVM R28.2.7 requires only 441MB to run a program that has a 400MB base memory usage plus 40MB fluctuating memory usage with object size of 1.25MB. Basically, the JRockit GC requires only 1MB to manage dead objects and other system tasks.
But please note that JRockit must run GC much more frequently than HotSpot to support this low free memory situation. This will definitely impact the execution time performance of the application.
Last update: 2014.
Table of Contents
Downloading and Installing JDK 1.8.0 on Windows
Downloading and Installing JDK 1.7.0 on Windows
java.lang.Runtime Class - The JVM Instance
java.lang.System Class - The Operating System
ClassLoader Class - Class Loaders
Class Class - Class Reflections
JRockit JVM 28.2.7 by Oracle Corporation
Memory Management and Garbage Collectors
GCTest2.java - Garbage Collection Test Program
640/400/40MB Test on HotSpot Client 1.7
640/400/40MB Test on HotSpot Client 1.6
640/400/40MB Test on JRockit 28.2
►441/400/40MB Test on JRockit 28.2
1076/800/80MB Test on HotSpot Client 1.7
1076/800/80MB Test on HotSpot Client 1.6
1076/800/80MB Test on JRockit 28.2
JVM Stack, Frame and Stack Overflow
Thread Testing Program and Result
CPU Impact of Multi-Thread Applications
I/O Impact of Multi-Thread Applications
Micro Benchmark Runner and JVM Options
Micro Benchmark Tests on "int" Operations
Micro Benchmark Tests on "long" Operations
Micro Benchmark Tests in JIT Compilation Mode