GraalVM at Oracle NetSuite
Oracle has completely moved its integrated application suite of cloud business software, known as Oracle NetSuite (hereafter, “NetSuite”), to Oracle GraalVM for JDK 17. This recent migration has increased the overall performance of the application suite and reduced its consumption of resources. Keep reading to learn more about the migration, performance gains, and future plans.
The Technology Behind NetSuite
At its heart, NetSuite is a large-scale Java application that runs on more than 10,000 application servers worldwide. Each instance of the application consists of about 100,000 loaded Java classes.
Oracle achieved the seamless transition to Oracle GraalVM without any changes to the application's source code or modifications to its deployment configuration. There were no classpath changes and no dependency conflicts with the libraries used by the application.
Why Oracle GraalVM?
Oracle GraalVM measurably reduced the CPU time needed by NetSuite. Because it runs on tens of thousands of application servers, any reduction in CPU time has the potential to reduce the number of servers. It was simple to switch to the Graal JIT compiler by just replacing the existing JDK installation with no additional configuration.
Java Performance Results
The team tested the performance of NetSuite running with the Graal JIT and the performance with their existing JDK installation. Both were based on the same version of JDK: 17.0.6.
The results were divided into two categories based on the type of NetSuite server: Request Servers and Background Job Servers.
Using Graal JIT reduced the CPU time on both server types, achieving 1.08x speedup on average on the request serving servers (7.39% CPU time reduction) and 1.07x speedup on average on the background job processing servers (6.37% CPU time reduction). On some workloads, the average CPU time usage was reduced even by 13%, resulting in 1.15x speedup.
Executing JavaScript on the JVM
In addition to the acceleration GraalVM provides for Java, NetSuite also leverages Graal.js in its SuiteScript extension language. Built on JavaScript, SuiteScript enables complete customisation and automation of business processes. Using the SuiteScript APIs, core business records and user information can be accessed and manipulated via scripts that are executed at pre-defined events, such as field change or form submission. NetSuite chose Graal.js as their JavaScript runtime because of its support for the latest ECMAScript standards, the ease of migration from Rhino, and its outstanding performance. Graal.js is written using the GraalVM Truffle framework which enables compilation of guest language code (JavaScript in this case) into optimized machine code. Read more about how Netsuite are using Graal.js and how it improves developer productivity in another blog post.
Conclusion and Future Plans
Compared to the previous installation, GraalVM reduced the CPU time consumed by the NetSuite application in the production environment by 6.4–7.4% on average with as much as 13% on some workloads. The transition to GraalVM was as simple as upgrading to the new GraalVM release.
The design of GraalVM enables maintenance as well as the addition of incremental improvements. Therefore, we expect NetSuite to achieve even better performance characteristics in the future thanks to new compiler optimizations and Truffle framework improvements.