Thread Test on HotSpot 1.7

This section provides a tutorial example to see how many running threads can be supported on HotSpot 1.7.0_45 Client and Server JVMs.

The first test of is done with HotSpot Client JVM 1.7.0 on my Windows 7 system.


>\Progra~1\java\jdk1.7.0_45\bin\java -Xmx2m CrashThread2 64

Time   Threads   T.Memory   F.Memory
8:07:32 PM   1   1984   1563
8:07:32 PM   2   1984   1563
8:07:32 PM   3   1984   1563
8:07:32 PM   62   1984   1509
8:07:32 PM   63   1984   1509
8:07:32 PM   64   1984   1509

There is no problem for HotSpot Client JVM to support for 64 running threads. However, when I look at the Task Manager, I noticed that the JVM is taking 99% of CPU time and 7,348K of memory. And my computer becomes slow.

Then I increased # of threads to higher values, I observed the following on system Task Manager:

HotSpot Client JVM 1.7.0_45
Threads   CPU    Memory   System 
     64   99%    7,348K   slow
    128   99%    9,488K   slow
    256   99%   13,696K   slow
    512   99%   22,392K   very slow
   1024   99%   39,700K   very slow
   2048   99%   73,256K   extremely slow

I repeated the same test on HotSpot Server JVM 1.7.0_45 and observed similar results:

HotSpot Server JVM 1.7.0_45
Threads   CPU    Memory   System 
     64   99%    8,712K   slow
    128   99%   10,800K   slow
    256   99%   14,988K   slow
    512   99%   23,700K   very slow
   1024   99%   40,992K   very slow
   2048   99%   75,333K   extremely slow

Last update: 2014.

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 - Thread Testing Program

Thread Test on HotSpot 1.7

 Thread Test on JRockit 28.7

 Thread Test on HotSpot 1.4 and JRockit 7.0

 Thread Test on HotSpot 1.6

 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


 PDF Printing Version