JVM Tutorials - Herong's Tutorial Examples - v5.14, by Herong Yang
Benchmark Affected by Other Running Applications
This section provides a tutorial example showing how the benchmark test result is affected by other running applications on the operating system.
In order to confirm where those interruptions are coming from, I repeated the test while I was using Firefox to download a large file from Internet.
herong> java -XX:+PrintGC -XX:+UseSerialGC -Xms100m -Xmx100m \ BenchmarkRunner BenchmarkLoopTest emptyLoop 10000 3 3 Are you ready? y Waking up the JIT compiler... Run: 1, Time: 6146, Test returns: 3 Run: 2, Time: 3632, Test returns: 3 Run: 3, Time: 3352, Test returns: 3 ... Run: 447, Time: 2235, Test returns: 3 Run: 448, Time: 12571, Test returns: 3 Run: 449, Time: 3631, Test returns: 3 ... Run: 713, Time: 2235, Test returns: 3 Run: 714, Time: 104482, Test returns: 3 Run: 715, Time: 2514, Test returns: 3 ... Run: 890, Time: 2515, Test returns: 3 Run: 891, Time: 11733, Test returns: 3 Run: 892, Time: 6146, Test returns: 3 ... Run: 2608, Time: 1956, Test returns: 3 Run: 2609, Time: 10336, Test returns: 3 Run: 2610, Time: 1955, Test returns: 3 ... Run: 3304, Time: 1955, Test returns: 3 Run: 3305, Time: 10058, Test returns: 3 Run: 3306, Time: 1955, Test returns: 3 ... Run: 5818, Time: 1955, Test returns: 3 Run: 5819, Time: 10336, Test returns: 3 Run: 5820, Time: 1955, Test returns: 3 ... Run: 5980, Time: 1955, Test returns: 3 Run: 5981, Time: 3073, Test returns: 3 Run: 5982, Time: 20393, Test returns: 3 Run: 5983, Time: 2514, Test returns: 3 Run: 5984, Time: 1955, Test returns: 3 ... ... 10 more interruptions ...
Conclusions based on the test result:
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
BenchmarkRunner.java - Benchmark Runner Program
emptyLoop() - The Empty Loop Test Method
"-XX:+PrintCompilation" - Watching JIT Compilation Logs
"-XX:+PrintGC" - Watching GC (Garbage Collection) Logs
"-Xms" and "-Xmx" - Avoiding GC with Large Memory Size
►Benchmark Affected by Other Running Applications
"-Xint" - Running in Interpreted-Only Mode
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
JRockit JVM 28.2.7 by Oracle Corporation
JVM Bytecode and Instruction Set