In containerized environments we have huge waste in terms of resources when use java. In terms of vertical scaling we need to have an optimized JVM. Are there any public comparison tests available of vertical scaling and memory usage of OpenJ9 and HotSpot G1
Is OpenJDK 12 better than J9 for vertical scaling?
It's hard to answer at this stage as there are no publicly available comparison tests. Now both JVMs look good in terms of elasticity.
There is one known issue related to monitoring mechanism of the committed RAM.
With OpenJ9 you have to do it on OS level
To test vertical scaling with respect to memory in OpenJ9 I recommend to monitor the resident-set-size (RSS) of a Java process with a script like this:
while true; do
sleep 1
ps -orss --no-headers --pid $1
done
While OpenJDK allows to monitor the committed RAM inside a code running in JVM, and also you can use standard tools like VisualVM or others.