Azul Introduces Code Inventory The Solution That Identifies Unused and Dead Code for Removal in Production, Saving Developer Time and Money 
Support

Cloud Native Compiler FAQ

Product Questions 

What is Azul Cloud Native Compiler?

The Cloud Native Compiler is a scalable Just-In-Time (JIT) compilation server. It enables Java Virtual Machines, Java runtimes allowing Java programs to ‘write once, run anywhere’, to provide a server-side optimization solution that offloads JIT compilation to separate and dedicated service resources, providing more processing power to JIT compilation while freeing your client JVMs from the burden of doing JIT compilation locally.This allows you to improve Java and JVM-based application performance while right-sizing infrastructures to deliver cost savings, especially when leveraging cloud connectivity at scale.

 

With and Without Cloud Native Compiler

What is a Just-In-Time Compiler?

A Just-In-Time (JIT) compiler is a component of the runtime environment that improves the performance of Java applications by compiling bytecodes to optimized native machine code at runtime. JIT optimization provides a multitude of benefits, including the ability to use speculative optimizations that lead faster eventual code. However, traditional on-JVM JIT compilers must share the JVM’s local CPU resources and compete with the application logic in using that capacity. This presents several challenges:

  • The JIT compiler is limited in resources. Resulting optimizations take time to arrive at, and benefits are limited by the practical amount of time that applications can wait for optimization and warm-up to complete.
  • The JIT compiler is limited in how aggressively it can afford to optimize code. The resulting optimizations are not as fast as they could be if the optimizer had more resources available

The Cloud Native Compiler provides a server-side solution to overcome these challenges when deployed alongside connected Zulu Prime-based Java Virtual Machines.

When was Cloud Native Compiler released?

Cloud Native Compiler became generally available on October 15th 2021 as a customer-managed component in conjunction with Azul Platform Prime, formally launched on December 15th 2021.

The Cloud Native Compiler works with the Zulu Prime JVM only? How does it benefit a Zulu Prime workflow?

Yes, Cloud Native Compiler leverages Falcon Compiler technology, part of the Prime JVM.

At a high level, Cloud Native Compiler when used with Azul Platform Prime immediately allows users to offload JIT compilation from the JVM to dedicated servers. This frees JVM processes from expensive compute and memory overheads at key times, like warm-up. Cloud Native Compiler also improves performance, ensures consistency of performance, and reduces costs by right-sizing resources.

At a deeper level, using more aggressive optimization levels requires more resources, and when using JVM-local JIT compilers for optimization, resource tradeoffs can often lead to a choice of lowering optimization levels in favor of improved warmup times. Cloud Native Compiler eliminates trade-offs by removing JIT compilation work from individual JVMs and shifting the work of the Falcon JIT compiler to a separate shared service. This shift of work and associated resources allows the Cloud Native Compiler to apply even the most aggressive Falcon JIT optimization levels without disrupting individual JVM behavior.

How can I try Azul Platform Prime?

Azul Platform Prime Stream Builds are free for development, testing, and evaluation. You can see if your environment is supported by checking our specifications page. To request an on-site evaluation and work with an Azul expert, simply contact us.

How does Cloud Native Compiler compare to Ahead of Time compilation?

Cloud Native Compilation is a fundamentally different approach than AOT (Ahead Of Time) compilation, and results in dramatic infrastructure savings and footprint reduction. Where pure-AOT solutions (e.g.  like GraalVM Native Image) focus on statically compiling applications into a small and quick-to-start executable, the resulting code is less optimized, runs slower, and requires more resources (and cost) to carry the same load.

In order to avoid the burden and local costs of JIT optimization, such pure-AOT static compilers sacrifice key optimizations. In contrast, Cloud Native Compilation retains the full power of JIT compilation, and “turns it on to the max” by shifting the heavy lifting optimization work away from the running application instances, and onto a shared, elastic, and efficient cloud resource.

This allows JVMs to benefit from powerful optimizations and results in faster and more efficient code, which in turn translates to lowered cloud spend as a smaller infrastructure footprint is needed to run the same workload.

Technical Questions 

Will I need to make changes to my Java code in order to run Azul Platform Prime and the Cloud Native Compiler?

No. Deploying Azul Platform Prime requires no changes to existing applications. You merely point the application’s JAVA_HOME environment variable to Azul Platform Prime and you are running on the most scalable JVM on the market. Azul Platform Prime also requires no changes to other aspects of your infrastructure – security, other applications, monitoring tools, etc.

What do I need to run the Cloud Native Compiler?

You must have access toAzul Zing Builds of OpenJDK (part of the Azul Platform Prime product) and access to a Kubernetes cluster. If you do not have a Kubernetes cluster, the Installing Cloud Native Compiler Documentation will help you set it up. Azul Engineers are available for further guidance.

Cloud Native Compiler is best deployed on elastic (cloud) infrastructures, easy to spin up and easy to take down. It benefits larger Zulu Prime configurations. Anything above 50 server instances could show Cloud Native Compiler benefits for key JIT compilation processes, e.g., warm-up. However, the larger the configurations of JVMs, the greater the likely impact.

What versions of Zulu Prime does the Cloud Native Compiler support?

21.09 and above.

What technology is the Cloud Native Compiler based on?

The Cloud Native Compiler, like Azul Zing Builds of OpenJDK, leverages the Falcon JIT compiler, which is based on technology from LLVM, the popular compiler infrastructure project with active involvement from leading universities and dozens of corporate contributors including Adobe, Apple, Google, NVIDIA, and Intel. For those familiar with mathematical programming languages, it is the foundation for the increasingly popular technical and numerical computing language, Julia, demonstrating its utility for data transformation and mathematical operations.

What resources are required to run Cloud Native Compiler?

The Cloud Native Compiler resources can be dialled up and down as needed. When no JVMs are being started or restarted, the cloud native compiler can be dialled down to a minimal footprint. Since the Cloud Native Compiler (CNC) service uses a large amount of resources (recommended 4 CNC vCores for every JVM vCore), it is imperative to correctly configure autoscaling.

Azul recommends 1 cache for every 15 compile brokers. This will change in future with Cloud Native Compiler updates, in addition to improved autoscaling capabilities. Currently scaling is primarily manual, with some experimental autoscaling options, such as HPA config in the YAMLs.

Remember that the Cloud Native Compiler needs and uses large amounts of capacity for short bursts of time, so consider within an infrastructure of overall optimizing application efficiency, right-sizing resources where and when they are needed.

Are there Cloud Native Compiler benchmarks?

Please see the blog post: Cloud Native Compilation: Bringing JVMs into the Modern Cloud World. It will give context to the following chart which shows improved warm-up by offloading to Clould Native Compiler while delivering sustained improvement once warm.

Throughput Over Time

Meanwhile, and importantly, CPU use on the client remains low and steady, allowing you to allocate more power to running your application logic even during warmup.

CPU Use Over Time

Which logging and monitoring options are available to me?

You can integrate Cloud Native Compiler into existing Prometheus/Grafana applications. All pods export metrics for Prometheus scraping and include dashboard JSON to add to Grafana instances. <cnc-install-dir/grafana/cnc_dashabord.json is a Grafana configuration file for a dashboard of key Cloud Native Compiler metrics. You can import the dashboard into your existing Grafana installation.

How secure is the connectivity between the JVM instance and Cloud Native Compiler?

You can securely send application byte code. Simply enable SSL authentication on your Cloud Native Compiler services. Prepare your SSL certificate, provision your service and by default, Azul Prime connects to the Cloud Native Compiler service using SSL. Learn more about security provisioning in the documentation.

Business Questions 

What is the cost of Cloud Native Compiler?

Support for the Cloud Native Compiler is included in the annual cost of Azul Platform Prime. Please see the Azul Platform Prime pricing for more information and support tier options.

Can I evaluate Cloud Native Compiler and Azul Platform Prime?

Cloud Native Compiler is free to use with any properly licensed Azul Zing Builds of OpenJDK. The Installing Cloud Native Compiler Documentation will help you set it up. Azul Engineers are available for further guidance. If you need Zulu Prime bits, please visit the download page at https://www.azul.com/products/prime/stream-download/. Cloud Native Compiler install components are available on the Azul cdn and on Dockerhub.

Azul Zing Builds of OpenJDK are available for development, testing and evaluation. Stable Azul Zing Builds of OpenJDK are for production use, super-stable builds that incorporate only CPUs, PSUs, and Azul Platform Prime critical fixes, and do not uptake new features and non-critical enhancements from Stream Builds.

Where can I learn more about Cloud Native Compiler?

The best place to start is the product page at https://www.azul.com/products/prime/cloud-native-compiler/ and for detailed technical information at https://docs.azul.com/cloud_native_compiler/. An extended pdf-based version of this FAQ can be found here, to circulate with colleagues for example.

Cloud Native Compiler

Ready? So are we.

Our Java experts are ready to answer your questions and show you how much you could save by switching to Azul.