GraalVM is a universal virtual machine, designed to provide high performance and full interoperability for all programming languages.
Many teams in Oracle Cloud Infrastructure have seen improved performance by running their services on the GraalVM image. The Oracle Cloud Infrastructure Monitoring service recently completed the move and now runs on GraalVM in production.
Monitoring is a foundational service inside Oracle Cloud Infrastructure. All internal teams rely on it to monitor the health of the services they are responsible for. Monitoring is a memory-intensive application, heavily relying on Java Native Interface (JNI) calls. It offers REST APIs to allow applications to collect and act on host and application metrics, create alarms, and send notifications. It routinely processes tens of millions of data points coming from all Oracle Cloud Infrastructure services. The Monitoring service is ubiquitous across Oracle Cloud Infrastructure, ingesting billions of metrics and serving millions of requests.
The optimizations of the GraalVM Enterprise Edition version 19.1 compiler reduce object allocations and improve overall execution speed. The result is fewer garbage collection pauses and less computing power needed to run a workload. The Monitoring service now consumes 5% less CPU overall, sees higher throughput, and has significantly reduced the time spent on garbage collection and other system activities, as shown in the following sections.
The Monitoring service reduced its garbage collection time by 25% in comparison with Java 8 update 212 and reduced the application pause time by 17%. The following graphs show the application pause time reduction:
The GraalVM optimizations for the Monitoring service resulted in a 10% increase in the number of transactions per second compared to Java 8 update 212, as seen in the following graphs:
The process of moving the Monitoring service to GraalVM was simple and transparent. The service code and its JVM configurations didn’t require any modification to make the switch.
In conclusion, for a wide variety of cases and under various loads, GraalVM shows better performance than Java 8 update 212. The Monitoring service is a great example of achieving these benefits.