AdoptOpenJDK and Alibaba announced that the Alibaba Dragonwell JDK will be built, tested, and distributed using AdoptOpenJDK's infrastructure. This means users have more options and can opt to use Alibaba Dragonwell because of its unique features such as coroutine and warmup support.
Alibaba's Dragonwell is a downstream version of OpenJDK, that has some significant features that are not available in the OpenJDK mainline. Alibaba describes it as an OpenJDK build optimized for e-commerce, financial, and logistics applications. Alibaba uses Alibaba Dragonwell to run its applications on 100,000+ servers.
In 2019 Alibaba Dragonwell was made open source and it's available for free. Linux x86-64 is officially supported however, there's also an aarch64 build available and there is an experimental version for Windows. Alibaba mentions that it will provide long term support, but the exact period hasn't been defined.
Builds for Alibaba Dragonwell 8 and 11 will be published on the AdoptOpenJDK website. This means the AdoptOpenJDK API can be used to download the binaries. This is particularly useful for organizations that automate the retrieval of new binaries.
One of the unique features of Alibaba Dragonwell is JWarmup. JWarmup tries to reduce the warmup performance challenges caused by JIT compilation. The solution uses precompiled hot methods to improve performance. To achieve this, two phases are defined: the pre-run and the normal run.
In the pre-run phase profiling data for the hot methods is recorded during a load test and stored in a file on disk. That file is used during the normal run where the JIT thread compiles the methods in the file to native versions. Now those methods are executed natively from startup instead of interpreted. This reduces the warmup phase of an application which results in improved performance for applications that just started.
These types of ideas to reduce warmup effects have been discussed for many years - for example, Azul Systems have a technology in their Zing JVM called ReadyNow! which also reuses compilation data from previous runs. The addition of tiered compilation and the jaotc compiler also represent steps in the direction of improving startup performance by reducing or sidestepping the amount of interpreted mode that is executed.
Another interesting feature is the Wisp2 coroutine support. Wisp2 maps Java threads to coroutines instead of kernel-level threads. The performance of the application is potentially improved as many coroutines can be scheduled on a small number of core lines. This reduces the scheduling overhead and can show an improvement depending on the workload being run.
The Wisp2 engine is similar in some respects to the aims of Project Loom, which also tries to remove the bottleneck of the number of live threads by allowing developers to "virtualize" their threads and multiplex them onto a smaller number of platform threads that use similar approaches to coroutines.
The central idea of Wisp2 is that (unlike Loom) it works out of the box on existing code by enabling it with these Java arguments:
java -XX:+UnlockExperimentalVMOptions -XX:+UseWisp2
As Wisp2 requires no source code changes, the migration cost is low. Developers don't need to implement coroutines themselves and existing Java concurrency features can still be used.
However, not all applications benefit from Wisp2 and the impact of automatically moving all threads to coroutines can be very large (and not necessarily positive).
I/O intensive applications where tasks are blocked on events and then scheduled can benefit from the coroutine support. On the other side, CPU intensive applications will probably not benefit from coroutines. The easiest way to find out if an application benefits from Wisp2 is to enable the support and run a performance test.
Alibaba is actively working on contributing these and other features and patches to the upstream OpenJDK. For example, JWarmup is described in a Java Enhancement Proposal (JEP), but it's still in draft state at the time of writing.
AdoptOpenJDK and Alibaba Dragonwell are two of the most well-known distributions based on OpenJDK, but there are many more options such as: Amazon's Corretto, Sap's SapMachine, BellSoft's Liberica, Azul's Zulu, and ojdkbuild. The organizations deliver JDKs and JREs with different features and patches. Next to that, each organization determines its own support levels, some of which are paid. This gives customers more freedom as they can choose their preferred JDK based on the features and the support they need.
Updated: Corrected reference to the TCK status of Alibaba Dragonwell