JVM Tutorials - Herong's Tutorial Examples - v5.12, by Dr. Herong Yang
CPU Impact of Multi-Thread Applications
This chapter provides tutorial notes and example codes on CPU impact of multi-thread Java applications. Topics include CPU intensive thread test class, PrimeCalculator.java; CPU-Thread utilization of single-thread and multi-thread processes; maximum total productivity of multi-thread applications; thread execution priority; JRockit and HotSpot JVM comparison.
These sections are omitted from this Web preview version. To view the full content, see information on how to obtain the full version this book.
PrimeCalculator.java - CPU Intensive Process
PrimeCalculator.java - Run on Different Computers
CPU Intensive Process - 1 Thread per CPU
Single Thread Process on 2-CPU-4-Thread Machine
Two-Thread Process on 2-CPU-4-Thread Machine
Multi-Thread Process on 2-CPU-4-Thread Machine
Multi-Thread Process Slows Down System Response Time
Multi-Thread Process Running on JRockit JVM
Takeaways:
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
►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