JVM Tutorials - Herong's Tutorial Examples - Version 4.23, by Dr. Herong Yang
Running Multiple I/O Threads on JRockit
This section provides a tutorial example on running multiple I/O intensive threads on JRockit R28.2.7 on a Windows system. Multithreading on I/O intensive operations seems not improving total productivity.
Here are some results of running MultithreadingIoRunner.java with different numbers of threads with the default normal priority:
C:\>"\Program Files\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\java" MultithreadingIoRunner 1000 1 Thread parameter: 1000 Number of threads: 1 Monitoring interval: 1 Thread priority: 5 Seconds | Productivity per thread | Total | Average ... 394 | 441 | 441 | 445 395 | 494 | 494 | 445 396 | 479 | 479 | 445 397 | 482 | 482 | 445 398 | 471 | 471 | 445 399 | 306 | 306 | 445 ... C:\>"\Program Files\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\java" MultithreadingIoRunner 1000 2 Thread parameter: 1000 Number of threads: 2 Monitoring interval: 1 Thread priority: 5 Seconds | Productivity per thread | Total | Average ... 253 | 262 275 | 537 | 551 254 | 288 295 | 584 | 551 255 | 171 381 | 553 | 551 256 | 31 394 | 426 | 551 257 | 131 398 | 529 | 551 258 | 311 317 | 629 | 551 ... C:\>"\Program Files\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\java" MultithreadingIoRunner 1000 4 Thread parameter: 1000 Number of threads: 4 Monitoring interval: 1 Thread priority: 5 Seconds | Productivity per thread | Total | Average ... 601 | 176 189 14 142 | 523 | 631 602 | 227 234 16 214 | 694 | 631 603 | 170 274 37 176 | 658 | 631 604 | 257 252 16 245 | 772 | 631 605 | 124 106 119 117 | 467 | 631 606 | 192 229 109 230 | 762 | 631 ... C:\>"\Program Files\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\java" MultithreadingIoRunner 1000 8 Thread parameter: 1000 Number of threads: 8 Monitoring interval: 1 Thread priority: 5 Seconds | Productivity per thread | Total | Average ... 807 | 100 99 102 49 104 52 95 110 | 714 | 663 808 | 47 40 53 63 42 73 48 67 | 435 | 664 809 | 99 92 98 54 90 1 83 105 | 627 | 665 810 | 55 77 59 80 54 66 66 73 | 533 | 665 811 | 36 35 31 34 28 36 34 37 | 275 | 664 812 | 56 61 59 64 61 50 52 52 | 456 | 664 ... C:\>"\Program Files\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\java" MultithreadingIoRunner 1000 16 Thread parameter: 1000 Number of threads: 16 Monitoring interval: 1 Thread priority: 5 Seconds | Productivity per thread | Total | Average ... 308 | 37 49 51 48 38 51 51 49 54 54 50 52 51 49 54 49 | 791 | 748 309 | 15 39 44 43 46 40 45 38 48 41 46 40 42 52 43 41 | 669 | 748 310 | 13 40 51 49 50 46 53 48 52 48 49 45 50 59 50 48 | 756 | 748 311 | 10 49 42 48 49 49 50 49 51 47 58 48 48 57 50 47 | 757 | 748 312 | 36 34 33 31 32 34 35 33 34 34 38 35 30 40 33 31 | 551 | 748 313 | 49 40 48 42 40 41 39 35 43 40 45 42 38 39 42 43 | 672 | 748 ... C:\>"\Program Files\java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin\java" MultithreadingIoRunner 1000 32 Thread parameter: 1000 Number of threads: 32 Monitoring interval: 1 Thread priority: 5 Seconds | Productivity per thread | Total | Average ... 282 | 21 22 22 22 25 19 22 22 21 22 21 21 24 21 21 25 ... | 705 | 638 283 | 12 16 16 16 19 19 16 16 17 8 17 16 19 16 16 18 ... | 544 | 638 284 | 18 18 18 16 21 13 18 16 18 19 18 16 21 19 18 22 ... | 620 | 638 285 | 23 20 22 22 25 18 21 21 23 21 20 19 16 20 21 25 ... | 680 | 638 287 | 18 20 19 19 22 23 19 19 20 18 18 18 22 19 20 23 ... | 627 | 638 287 | 22 21 22 22 23 24 22 21 22 22 21 22 23 21 20 23 ... | 691 | 638 ...
The results from JRockit are similar to HotSpot. Multiple threads at the application level does not improve the total productivity at all.
Threads Productivity Percent 1 445 100.00% 2 551 123.82% 4 631 141.80% 8 663 148.99% 16 748 168.09% 32 638 143.37%
Last update: 2014.
Table of Contents
Downloading and Installing JDK 1.8.0 on Windows
Downloading and Installing JDK 1.7.0 on Windows
java.lang.Runtime Class - The JVM Instance
java.lang.System Class - The Operating System
ClassLoader Class - Class Loaders
Class Class - Class Reflections
JRockit JVM 28.2.7 by Oracle Corporation
Memory Management and Garbage Collectors
JVM Stack, Frame and Stack Overflow
Thread Testing Program and Result
CPU Impact of Multi-Thread Applications
►I/O Impact of Multi-Thread Applications
FileEditor.java - I/O Intensive Process
FileEditor2.java - Avoiding FileNotFoundException
MultithreadingIoRunner.java - Multiple I/O Threads
►Running Multiple I/O Threads on JRockit
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