JVM Tutorials - Herong's Tutorial Examples - v5.13, by Herong Yang
Thread Test on HotSpot JVM 10
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.
This test of CrashThread.java is done with HotSpot Client JVM 10 on my Windows 7 system.
herong> \Progra~1\java\jdk-10.0.1\bin\javac CrashThread2.java herong> \Progra~1\java\jdk-10.0.1\bin\java CrashThread2 64 Time Threads T.Memory F.Memory 9:01:34 PM 1 61440 58529 9:01:34 PM 2 61440 57055 9:01:34 PM 3 61440 57055 ... 9:01:34 PM 62 61440 57055 9:01:34 PM 63 61440 57055 9:01:34 PM 64 61440 57055
There is no problem for HotSpot Client JVM 10 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 27,084K of memory. And my computer becomes slow.
Table of Contents
JVM (Java Virtual Machine) Specification
Java HotSpot VM - JVM by Oracle/Sun
java.lang.Runtime Class - The JVM Instance
java.lang.System Class - The Operating System
ClassLoader Class - Class Loaders
Class Class - Class Reflections
JVM Stack, Frame and Stack Overflow
►Thread Testing Program and Result
CrashThread2.java - Thread Testing Program
►Thread Test on HotSpot JVM 10
Thread Test on HotSpot 1.4 and JRockit 7.0
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
Micro Benchmark Tests on "float" and "double" Operations