<p>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</p>

Kamen Tarlov
<blockquote>
  <p>Is OpenJDK 12 better than J9 for vertical scaling?</p>
</blockquote>

<p>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. </p>

<p>There is one known issue related to monitoring mechanism of the committed RAM. </p>

<p>With OpenJ9 <a href="https://github.com/eclipse/openj9/issues/2312#issuecomment-465850440" rel="nofollow noreferrer">you have to do it on OS level</a> </p>

<pre><code>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
</code></pre>

<p>While OpenJDK allows to <a href="https://github.com/jelastic/java-vertical-scaling-test/blob/master/src/com/jelastic/verticalscaling/MemoryUsage.java#L37" rel="nofollow noreferrer">monitor the committed RAM inside a code running in JVM</a>, and also you can use standard tools like VisualVM or others.   </p>
