Java 8 GC Tutorials - Herong's Tutorial Examples - v1.02, by Dr. Herong Yang
Outdated: 640/400/40MB Test on JRockit 28.2
This section provides a tutorial example on running GCTest2.java on JRockit 28.2.7 with 640MB memory limit and a 400MB base plus 40MB fluctuating memory usage with object size of 1.25MB.
My next test with GCTest2.java was done on JRockit R28.2.7 and maximum memory of 640MB 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 -Xmx640m 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 558284 107470 450814 19% 450560 409600 40960 254 2 558284 66415 491869 11% 491520 409600 81920 349 3 558284 25455 532829 4% 532480 409600 122880 349 4 655360 81659 573701 12% 450560 409600 40960 123141 5 655360 40698 614662 6% 491520 409600 81920 123142 6 655360 122619 532741 18% 450560 409600 40960 82181 7 655360 81657 573703 12% 491520 409600 81920 82183 8 655360 40672 614688 6% 532480 409600 122880 82208 9 655360 81656 573704 12% 450560 409600 40960 123144 10 655360 40695 614665 6% 491520 409600 81920 123145 11 655360 122616 532744 18% 450560 409600 40960 82184 12 655360 81656 573704 12% 491520 409600 81920 82184 13 655360 40670 614690 6% 532480 409600 122880 82210 14 655360 81653 573707 12% 450560 409600 40960 123147 15 655360 40693 614667 6% 491520 409600 81920 123147 16 655360 122615 532745 18% 450560 409600 40960 82185 17 655360 81654 573706 12% 491520 409600 81920 82186 18 655360 40669 614691 6% 532480 409600 122880 82211 19 655360 81653 573707 12% 450560 409600 40960 123147 20 655360 40693 614667 6% 491520 409600 81920 123147 21 655360 122614 532746 18% 450560 409600 40960 82186 22 655360 81654 573706 12% 491520 409600 81920 82186 23 655360 40693 614667 6% 532480 409600 122880 82187 24 655360 81653 573707 12% 450560 409600 40960 123147 25 655360 40692 614668 6% 491520 409600 81920 123148 27 655360 122620 532740 18% 450560 409600 40960 82180 28 655360 81660 573700 12% 491520 409600 81920 82180 29 655360 40674 614686 6% 532480 409600 122880 82206 30 655360 81657 573703 12% 450560 409600 40960 123143 31 655360 40697 614663 6% 491520 409600 81920 123143 32 655360 122617 532743 18% 450560 409600 40960 82183 33 655360 81657 573703 12% 491520 409600 81920 82183 34 655360 40696 614664 6% 532480 409600 122880 82184 35 655360 81661 573699 12% 450560 409600 40960 123139 36 655360 40700 614660 6% 491520 409600 81920 123140 37 655360 122618 532742 18% 450560 409600 40960 82182 38 655360 81656 573704 12% 491520 409600 81920 82184 39 655360 40670 614690 6% 532480 409600 122880 82210 40 655360 81652 573708 12% 450560 409600 40960 123148 41 655360 40691 614669 6% 491520 409600 81920 123149 42 655360 122612 532748 18% 450560 409600 40960 82188 43 655360 81651 573709 12% 491520 409600 81920 82189 44 655360 40691 614669 6% 532480 409600 122880 82189 45 655360 81652 573708 12% 450560 409600 40960 123148 46 655360 40691 614669 6% 491520 409600 81920 123149 47 655360 122617 532743 18% 450560 409600 40960 82183 48 655360 81657 573703 12% 491520 409600 81920 82183 49 655360 40672 614688 6% 532480 409600 122880 82208 50 655360 81680 573680 12% 450560 409600 40960 123120 51 655360 40720 614640 6% 491520 409600 81920 123120 ... 498 655360 163599 491761 24% 450560 409600 40960 41201 499 655360 122639 532721 18% 491520 409600 81920 41201 500 655360 81653 573707 12% 532480 409600 122880 41227 501 655360 40693 614667 6% 573440 409600 163840 41227 502 655360 40714 614646 6% 450560 409600 40960 164086
The output looks good. The GC worked nicely upto second 502. Comparing with HotSpot Client JVM 1.7.0, you can see 2 main differences:
Table of Contents
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
Outdated: GCTest2.java - Garbage Collection Test Program
Outdated: 640/400/40MB Test on HotSpot Client 1.7
Outdated: 640/400/40MB Test on HotSpot Client 1.6
►Outdated: 640/400/40MB Test on JRockit 28.2
Outdated: 441/400/40MB Test on JRockit 28.2
Outdated: 1076/800/80MB Test on HotSpot Client 1.7
Outdated: 1076/800/80MB Test on HotSpot Client 1.6