JVM Tutorials - Herong's Tutorial Examples - Version 4.23, by Dr. Herong Yang
1076/800/80MB Test on HotSpot Client 1.6
This section provides a tutorial example on running GCTest2.java on HotSpot Client JVM 1.6.0_45 with 1076MB memory limit and a 800MB base plus 80MB fluctuating memory usage with object size of 1.25MB.
As a comparison, I ran GCTest2.java with the same parameters on HotSpot Client 1.6.0_45 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\jdk1.6.0_45\bin\java -Xmx1076m GCTest2 1280 640 64
Test parameters:
Object size: 1280KB
Initial objects and data size: 640, 819200KB
Added objects and data size: 64, 81920KB
Time Total Free Used Free Total Act. Dead Over
sec. Mem. Mem. Mem. %. Obj. Obj. Obj. Head
1 1065152 163847 901305 15% 901120 819200 81920 185
2 1065152 81926 983226 7% 983040 819200 163840 186
3 1065152 163852 901300 15% 901120 819200 81920 180
4 1065152 81931 983221 7% 983040 819200 163840 181
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at GCTest2$MyObject.<init>(GCTest2.java:70)
at GCTest2.myTest(GCTest2.java:37)
\Progra~1\java\jdk1.6.0_45\bin\java -Xmx1077m GCTest2 1280 640 64
Test parameters:
Object size: 1280KB
Initial objects and data size: 640, 819200KB
Added objects and data size: 64, 81920KB
Time Total Free Used Free Total Act. Dead Over
sec. Mem. Mem. Mem. %. Obj. Obj. Obj. Head
1 1067136 165831 901305 15% 901120 819200 81920 185
2 1067136 83910 983226 7% 983040 819200 163840 186
3 1067136 1985 1065151 0% 901120 819200 81920 164031
5 1067136 83914 983222 7% 901120 819200 81920 82102
6 1067136 1993 1065143 0% 983040 819200 163840 82103
7 1067136 1993 1065143 0% 901120 819200 81920 164023
9 1067136 83916 983220 7% 901120 819200 81920 82100
10 1067136 1993 1065143 0% 983040 819200 163840 82103
11 1067136 1995 1065141 0% 901120 819200 81920 164021
12 1067136 83917 983219 7% 901120 819200 81920 82099
13 1067136 1993 1065143 0% 983040 819200 163840 82103
15 1067136 1994 1065142 0% 901120 819200 81920 164022
16 1067136 83910 983226 7% 901120 819200 81920 82106
17 1067136 1983 1065153 0% 983040 819200 163840 82113
19 1067136 1980 1065156 0% 901120 819200 81920 164036
20 1067136 83917 983219 7% 901120 819200 81920 82099
21 1067136 1952 1065184 0% 983040 819200 163840 82144
22 1067136 1991 1065145 0% 901120 819200 81920 164025
24 1067136 83917 983219 7% 901120 819200 81920 82099
25 1067136 1949 1065187 0% 983040 819200 163840 82147
26 1067136 1991 1065145 0% 901120 819200 81920 164025
27 1067136 83917 983219 7% 901120 819200 81920 82099
28 1067136 1949 1065187 0% 983040 819200 163840 82147
30 1067136 1991 1065145 0% 902400 819200 83200 162745
31 1067136 83917 983219 7% 902400 819200 83200 80819
As you can see, I got the same results on HotSpot 1.6 as 1.7.
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