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
- HotSpot JVM 10 has a huge improvement in performance over HotSpot JVM 1.8
in calculating prime numbers.
- The maximum total productivity of a multi-thread CPU intensive application is limited by the total CPU
execution power of the processor hardware.
- Running an application with a number of threads higher than the number CPU in the processor hardware
does not improve total productivity of the application.
- The Intel Core i5-2520M 2-CPU-4-Thread processor is having about 222% of a single CPU execution power.
- Multi-thread applications should run with lower thread execution priority to avoid jamming the computer system.
- JRockit R28.2.7 JVM performs better than HotSpot 1.7 JVM with CPU intensive threads.
Table of Contents
About This Book
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 Runtime Data Areas
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
OpenJ9 by Eclipse Foundation
JRockit JVM 28.2.7 by Oracle Corporation
Full Version in PDF/EPUB