JVM Tutorials - Herong's Tutorial Examples - Version 4.23, by Dr. Herong Yang
Thread Test on HotSpot 1.6
This section provides a tutorial example to see how many running threads can be supported on HotSpot 1.6.0_02 Client and Server JVMs.
After installing JDK 6u2, I tested the CrashThread.java program again on a Windows XP system. Here are the results.
Both HotSpot Client and HotSpot Server 1.6.0_02 have no problem with 16 threads.
With 32 threads running, HotSpot Client 1.6.0_02 took 99% of the CPU time according to the report from Windows Task Manager. The system was not jammed. But it became sluggish.
With 32 threads running, HotSpot Server 1.6.0_02 also took 99% of the CPU time according to the report from Windows Task Manager. But the system response time was much better that HotSpot client test.
With 128 threads running under HotSpot Client 1.6.0_02. The system became very sluggish. But I was able to launch other applications.
With 128 threads running under HotSpot Server 1.6.0_02. The system became sluggish. But everything is working fine.
With 512 threads running under HotSpot Server 1.6.0_02. The system became very sluggish. But the system was not totally frozen. I was still able to use a text editor to types these notes.
Obviously, there has been a major thread management improvement of JDK 1.6.0 on a Windows XP system over JDK 1.4.0 on a Windows 2000 system.
Another interesting observation was that JDK 1.6.0 took some time (about 5 minutes) to launch all 512 threads, see the timestamps recorded below. May be extra time was spend on requesting more memory from the Windows system.
10:24:08 PM Launched thread 1 10:24:08 PM Launched thread 2 10:24:08 PM Launched thread 3 10:24:08 PM Launched thread 4 ... 10:28:59 PM Launched thread 508 10:28:59 PM Launched thread 509 10:28:59 PM Launched thread 510 10:28:59 PM Launched thread 511 10:28:59 PM Launched thread 512
Last update: 2007.
Table of Contents