Zing: Delivering More Performance with Less Administration
Jul 31, 2019 | 6 MIN READ
Jul 31, 2019 | 6 MIN READ
The Zing Virtual Machine (ZVM) has been developed to address the performance-related issues that result from a managed runtime environment that is provided by the JVM. These fall into two specific areas:
Zing replaces all the OpenJDK garbage collectors (CMS, G1, Parallel, etc.) with the Continuous Concurrent Compacting Collector (C4). C4 is a truly pauseless collector that will exhibit no degradation in GC related latency, even with heaps as big as 8 TB. The old, C2 JIT compiler has been replaced in Zing with the Falcon JIT developed using the LLVM open-source compiler infrastructure project. To address application warm-up time, Zing includes ReadyNow!, Azul technology that can use profiles collected from a stable running application. The profile can reduce much of the work that the JVM has to do when an application is restarted.
The latest release of Zing, version 19.07, is significant as it includes several new enhancements that deliver even greater performance and flexibility than in prior versions. The focus of this release has been to make Zing much simpler and more effective to use in a microservices, container or cloud-based environment.
Until Zing 19.07, the ZVM required the Zing System Tools (ZST). The ZST module is installed at the operating system level to manage the physical-to-virtual memory mapping of ZVM heaps directly, rather than using the Linux virtual memory subsystem. This provides a number of performance advantages like cache optimization and managing memory in a way that aligns with how JVM heaps are organized. The requirement of having root access to install the kernel-based ZST module affected the simplicity of Zing deployments within containers and to the cloud.
With Zing 19.07, the use of the ZST is now optional. Modern Linux kernels now include features that make it possible to replicate much of the functionality of ZST from a user-level process. For most use cases, Zing 19.07 eliminates the need to install anything requiring privileged accounts with root access.
For JVM-based microservices running in containers, deployment becomes identical to using any other Java runtime. The difference will be felt from the effect C4, Falcon and ReadyNow! have on improving service performance, increasing the capacity of existing infrastructure, and reducing both average and peak latency.
For certain workloads and configurations, the ZST module is still useful. Currently, the maximum heap space supported without the ZST is 1TB. In addition, above 256GB, the way C4 works requires slightly more effort so, for best results, it is recommended to keep the heap space below 256GB. This should not be an issue for the majority of users, especially those deploying microservices.
The performance of the ZVM is the same with or without the ZST. It is important to understand that the way C4, Falcon and ReadyNow! work does not change based on whether the ZST are being used or not.
As an example, below are the results of running a standard Cassandra benchmark, both with and without the ZST.
Above the 99.9th percentile, Zing with ZST shows a slight performance improvement but, for most of the time, performance is identical.
ReadyNow!, used to reduce the warm-up time of an application, has also been enhanced. This is useful for an application, like Cassandra, that is typically deployed in clusters of nodes. A canary node can be configured to generate a profile of the application that has reached a desired steady-state of optimally compiled code. The profile can then be deployed to all nodes in the cluster to replicate the performance level quickly and easily.
Zing 19.07 also improves the performance of other common workloads. Enhancements both directly from the LLVM project and those developed internally have been included in the Falcon JIT. The Apache Solr search platform is now 25-75% faster than OpenJDK 8 using standard benchmarks. Apache Spark queries benchmark 24% faster on Zing 19.07.
To aid development and production management of Zing-based workloads, Azul has also included Flight Recorder functionality into the Zing runtime. Flight Recorder is a feature developed for the Oracle JDK, which was recently released as open-source and contributed to the OpenJDK 11 project. Azul has integrated this code into Zing 19.07, making it available for both Java SE 8 and 11. Zulu Mission Control is also supported as part of every Zing subscription. Zing now integrates this powerful and flexible graphical APM tool that can use either real-time data from a running Zing instance or perform post-run analysis on a pre-recorded log file.
Running the ZVM without the ZST makes testing as simple as changing your $JAVA_HOME and restarting your application. Why not give it a try and find out how much you can reduce your application latency and improve throughput without changing a line of code?