This site is all about the changes I made to the OpenJDK source based
on Azul Systems Memory Management Module published at http://www.managedruntime.org/.
The Azul MRI released two interesting components.
The memory management module is a Linux kernel patch + module and user libraries allowing fast memory allocation / rellocation.
The patched version of the OpenJDK contains the GenPauseless GC. It is a GC optimized for low to virtually no pause during garbage collection.
RMS (Remapping Mark Sweep) is a GC I implemented utilizing the Azul memory management module.
RMS works by partitioning the heap into pages.
Each page is two mega-byte large.
It then uses the Azul MME (memory management engine) to rellocate free pages to the end of the heap,
thus compacting the heap again.
All benchmarks were performed on the same system.
results.xls - outdated
Test # | Style | Description | Java Default | RMS 2010-10-06 |
RMS 2010-10-09 |
RMS 2010-12-15 |
RMS 2010-12-18 |
RMS 2011-01-02 |
---|---|---|---|---|---|---|---|---|
Test1.java | ST | Allocate about 1GB of byte data and release | 613 | 287 | 287 | 267 | 251 | 247 |
Test2.java | ST | Allocate about 1GB of object array data and release | 730 | 306 | 289 | 262 | 246 | 242 |
Test3.java | ST | Allocate about 1GB of object array data and initialize the array with objects and release |
2831 | 622 | 521 | 440 | 357 | 383 |
TestMt1.java | MT | ten threads each allocating about 100MB of byte data and release | 585 | 218 | 205 | 196 | 191 | 178 |
TestMt2.java | MT | 10 threads allocating each about 100MB of object array data and release | 2386 | 303 | 231 | 197 | 186 | 181 |
TestMt3.java | MT | 10 threads each allocating about 100Mb of object array data and initialize the array with objects and release |
576 | 923 | 646 | 497 | 283 | 267 |
TestMt4.java | MT | 10 threads each allocating about 200MB of object array data and initialize the array with objects and release |
3654 | 3427 | 2580 | 1806 | 821 | 775 |
TestMt4.java (10GB heap) |
MT | 10 threads each allocating about 200MB of object array data and initialize the array with objects and release 10GB heap |
2793 | 2094 | 1543 | 1174 | 610 | 587 |
TestMt5.java (1000 iterations) |
MT | 10 threads each allocating about 100Mb of object array data and initialize the array with objects and release 1000 iterations |
1005 | 901 | 669 | 516 | 284 | 271 |
TestMt5.java (1000 iterations) (10GB heap) |
MT | 10 threads each allocating about 100Mb of object array data and initialize the array with objects and release 1000 iterations 10GB heap |
298 | - | 456 | 377 | 234 | 228 |
The mean time of 25 iterations (first 5 iterations are ignored) is determined.
Test # | Description | Java Default | RMS 2011-01-02 |
---|---|---|---|
eclipse | java -Xms6G -Xmx6G -jar dacapo-9.12-bach.jar --no-pre-iteration-gc -n 25 -t 64 eclipse | 17043 | 17482 |
fop | java -Xms6G -Xmx6G -jar dacapo-9.12-bach.jar --no-pre-iteration-gc -n 25 -t 64 fop | 380 | 354 |
h2 | java -Xms6G -Xmx6G -jar dacapo-9.12-bach.jar --no-pre-iteration-gc -n 25 -t 64 h2 | 14863 | 15271 |
jython | java -Xms6G -Xmx6G -jar dacapo-9.12-bach.jar --no-pre-iteration-gc -n 25 -t 64 jython | 2364 | 2463 |
luindex | java -Xms6G -Xmx6G -jar dacapo-9.12-bach.jar --no-pre-iteration-gc -n 25 -t 64 luindex | 680 | 664 |
lusearch | java -Xms2G -Xmx2G -jar dacapo-9.12-bach.jar --no-pre-iteration-gc -n 25 -t 64 lusearch | 1053 | 1300 |
lusearch | java -Xms6G -Xmx6G -jar dacapo-9.12-bach.jar --no-pre-iteration-gc -n 25 -t 64 lusearch | 1021 | 1165 |
pmd | java -Xms6G -Xmx6G -jar dacapo-9.12-bach.jar --no-pre-iteration-gc -n 25 -t 64 pmd | 4578 | 4714 |
xalan | java -Xms6G -Xmx6G -jar dacapo-9.12-bach.jar --no-pre-iteration-gc -n 25 -t 64 xalan | 1071 | 1086 |
It is assumed that you use a vanilla Debian 5 (AMD64) base system
(with as many CPU cores as you can get your hands on).
I used the default GCC (4.3.2 with g++) for development.
Also install libstdc++6-4.3-pic (or libstdc++6-4.1-pic) using apt-get as I am using unordered_map.
apt-get --install libstdc++6-4.3-pic libstdc++6-4.1-pic
make && make install
insmod /lib/modules/2.6.34.5-azul/extra/azul_mm.ko
azpmem/azpmem --reserve --pages 4000
j2sdk-b20-rms.2010-10-06/bin/java -Xmx1G -XX:+UseAzMME -XX:+UseRMSGC
I want to thank Azul Systems for releasing this great memory management module.
Furthermore, the folks at irc://irc.oftc.net/openjdk for their great help at getting me started on this project.
(c) Pressenna Sockalingasamy