Allocation of a new object on the heap is not an atomic operation, so any Java memory manager has to protect the heap with a global lock to ensure correct parallel execution. However, naïve implementations of heap locking incur huge synchronization overheads, slowing memory‑intensive multithreaded applications down to nearly a halt on many-core systems.
To address the problem, any decent JVM would implement thread-local allocation (TLA), enabling it to create most objects without grabbing the global heap lock. Excelsior JET Desktop and Server Runtimes have included TLA since 2001.
Yet the overall computing power of today's PCs and especially servers exceeds the threshold above which the infamous global heap lock becomes a bottleneck again. That is why we have been overhauling the memory management subsystem of the Excelsior JET Server Runtime. Users of Excelsior JET 14 can already benefit from the first results of that work, and we expect to deliver further improvements in the following versions.
Test: Excelsior JET vs OpenJDK vs Eclipse OpenJ9
To illustrate the problem and our progress, we have written a microbenchmark that runs the specified number of parallel threads, with each thread allocating millions of temporary objects.
As you may see, with Excelsior JET 14 we have pretty much caught up with OpenJDK. It was interesting for us to discover that they both surpass the latest Eclipse OpenJ9 build.
That being said, even though this benchmark has its roots in a real customer application, it does little work beside stress testing the memory manager. You are welcome to download an evaluation copy of Excelsior JET and test it against your own memory-intensive, heavily multithreaded real-world applications. Please share the results with us!
System: Dell PowerEdge R730
CPU: Dual Intel Xeon CPU E5-2620 v4 2.10GHz Octa-Core (16 cores total)
L3 cache: 20 Mbytes (per processor)
RAM: 128 GB
O/S: Windows Server 2012 Standard
openjdk version "1.8.0_101" OpenJDK Runtime Environment (build 1.8.0_101-_2016_07_21_03_01-b00) OpenJDK 64-Bit Server VM (build 25.101-b00, mixed mode)
Excelsior JET 12
Excelsior JET 12.00 Enterprise edition JET Profile [Java SE version: 1.8.0_121; JET update level: 0; CPU architecture: amd64] Runtime: Server [SMP: detected, optimizations: enabled, CoreBalance GC: available]
Excelsior JET 14
Excelsior JET 14.00 Enterprise edition JET Profile [Java SE version: 1.8.0_144; JET update level: 0; CPU architecture: amd64] Runtime: Server [SMP: detected, optimizations: enabled, CoreBalance GC: available]
OpenJDK Runtime Environment (build 9-internal+0-adhoc..openjdk) Eclipse OpenJ9 VM (build 2.9, JRE 9 Windows Server 2012 R2 amd64-64 Compressed References 20180122_18 (JIT enabled, AOT enabled)
As of version 15.0, the Server Runtime is included in the following Excelsior JET products:
- Excelsior JET, Enterprise Edition for Windows, OS X, and Linux
- Excelsior JET Embedded (all platforms, including Linux/ARM)