Tomcat-Tradelite7 Performance of OpenJ9 with default Shared Cache

Tomcat is a very popular and widely used application server. In this article I will show how Tomcat users can get some good performance boosts by using the Eclipse OpenJ9 JVM.

In different articles, we observed that OpenJDK8-OpenJ9 performed better with Startup and Footprint compared to OpenJDK8-HotSpot. Now with Shared Cache enabled by default with OpenJ9 , let’s do some experiments on how that would impact OpenJ9 by measuring the performance of Apache-Tomcat with the Tradelite7 application. 

Tradelite is a version of DayTrader benchmark and a good measure of the real-world workloads. Tradelite is a Java EE web application that uses servlets, JavaServer Pages (JSP), and JDBC. Unlike DayTrader, Tradelite does not use Enterprise JavaBeans (EJB) or the Java Message Service (JMS) application programming interface (API). For people looking for certain types of performance improvements, these findings are very telling.

To start with, 

  • Download Apache Tomcat (I used v9.0.21) and install Tradelite7*.

* Tradelite7 is not available externally but an early version of Tradelite8 is (if you want to try).

To calculate the Startup time and Footprint, below methods are used:

  • For Startup time: Use the log (catalina.out) generated by the server and look for “ INFO [main] org.apache.catalina.startup.Catalina.start Server startup in **** milliseconds”.
  • For Footprint: It is the sum of RSS of a process and Huge pages used (if enabled). RSS of a process is calculated using “ps -p <pid> -o rss”. Huge Pages used is the difference of the value from “/proc/meminfo” before and after the tomcat Startup.

Below are the different configurations I tried for Tomcat-Tradelite7 Startup/Footprint and JVM Options used for the same:

  • OpenJDK8-HotSpot : -Xmx256m
  • OpenJDK8-OpenJ9 with no SharedClasses(noSCC) : -Xmx256m -Xshareclasses:none
  • OpenJDK8-OpenJ9 with default Shared Cache(defaultSCC) : -Xmx256m
  • OpenJDK8-OpenJ9 with explicit Shared Classes(explicitSCC) : -Xmx256m -Xshareclasses

Below are the results of Startup and Footprint from my experiments:

Normalized Startup — Footprint

OpenJ9 with defaultSCC shows improved Startup Performance by almost 20% compared to noSCC. With explicit SCC, it has improved by ~40% compared to noSCC.

With the same benchmark, I did more experiments to find how the Throughput is affected, and from the results, it is observed that Throughput with defaultSCC is almost similar to HotSpot.

Normalized Throughput — Footprint

Above graphs Y-axis uses normalized data since it’s the relative picture that matters.

All Above experiments are done on a machine with following config

  • CPU Type: Intel(R) Xeon(R) Gold 6126 CPU @ 2.60GHz
  • 24 physical, 48 logical processors.
  • Pinned 4 processors to the server during the run. (used numactl — physcpubind=0–3 — membind=0)

Summary:

From the data we got, we can confirm that,

  • OpenJ9 with defaultSCC has an out-of-box ~20% reduced Startup time with 3% increased Footprint against noSCC; with explicitSCC a lot more reduced Startup time ~40% against noSCC.
  • OpenJ9 uses 2.2 times less Footprint with similar Startup time against Hotpot; with explicitSCC, ~20% reduced Startup time with 2.1 times reduced Footprint against HotSpot.
  • OpenJ9 uses 37% less Footprint during the load run with the same Throughput compared to HotSpot.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s