I read some good things about OpenJ9 in their website and decided to give it a try. In my tests I found out OpenJ9 JVM is using almost half of the memory of Hot Spot JVM.
Setup
My Spring Boot application deployed in Docker Swarm cluster which 3 nodes, each node has decent specs.
To test this, I used adoptopenjdk:11-jre-openj9-bionic docker image with default configuration. Built the project again and updated the docker service to use new images.
Then later switched to openjdk:11-jre-slim hot spot image and repeated same steps.
Results
Memory
In general OpenJ9 containers were using 330+Mb memory in idle state and upping based on number of requests. Hot spot containers using 580+ Mb memory in idle state and upping based on load. On average OpenJ9 containers were using 45–50% less memory than Hot spot.
CPU
CPU usage remained similar between both containers. Increased based on number of requests.
I/O
I/O performance is also similar with 5–10% difference
After this test and some other stress tests, I switched all of my production containers (9) to OpenJ9. Six months after, no complaints and still working great.