Outdated: GC Test - Client vs. Server

This section provides a tutorial example on testing garbage collection by comparing performances between HotSpot Server VM and HotSpot Client VM.

I also made some tests to compare between the client version and the server version of JDK 1.4.0.

java -server -Xms2m -Xmx8m GCTest 16 24 > tail_16_24.out

But the program ran out of memory the same way as the client version:

Time   Total   Free   Free   Total   Act.   Dead   Over
sec.    Mem.   Mem.   Per.    Obj.   Obj.   Obj.   Head

   0    1984   1726    86%       0      0      0    258
   0    1984   1593    80%     128    128      0    263
   1    1984   1463    73%     256    256      0    265
....
  19    5260    357     6%    4736   4736      0    167
  19    5260    227     4%    4864   4864      0    169
  20    8128   2997    36%    4992   4992      0    139
  20    8128   2867    35%    5120   5120      0    141
  21    8128   2866    35%    5120   4992    128    142
  21    8128   2864    35%    5120   4864    256    144
....
  41    8128    482     5%    7424   4352   3072    222
  42    8128    352     4%    7552   4480   3072    224
  42    8128    223     2%    7680   4608   3072    225
Exception in thread "main" java.lang.OutOfMemoryError

Last update: 2003.

Table of Contents

 About This Book

 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

 Sun's JVM - Java HotSpot VM

 JRockit JVM 28.2.7 by Oracle Corporation

 JVM Runtime Data Areas

 Memory Management and Garbage Collectors

 Garbage Collection Tests

 JVM Stack, Frame and Stack Overflow

 Thread Testing Program and Result

 CPU Impact of Multi-Thread Applications

 I/O Impact of Multi-Thread Applications

 CDS (Class Data Sharing)

 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

 Micro Benchmark Tests on "float" and "double" Operations

Outdated Tutorials

 Outdated: Download and Install Java SE 1.6 Update 2

 Outdated: Installing JRockit JVM 8.0

 Outdated: Testing with LongWhile.java

 Outdated: Testing with LongSleep.java

 Outdated: GCTest.java - Garbage Collection Test Program

 Outdated: GC Test - Constant Memory Requirement

 Outdated: GC Test - Periodical Memory Requirement

 Outdated: GC Test - Releasing Old vs. New Objects

 Outdated: GC Test - JDK 1.4.0 vs. JDK 1.3.1

Outdated: GC Test - Client vs. Server

 Outdated: StringBuffer Testing Program

 Outdated: Installing JRockit JVM 7.0

 Outdated: Running JRockit JVM with Management Console

 References

 PDF Printing Version