title: Does ZGC use more shared memory?
body: <p>Why does the JVM process using ZGC of OpenJDK 11 on CentOS within Docker use huge shared memory?</p>
  
  <p>Server: 2 cores/4G memory;
  VIRT: 17.032t, RES: 7.974g, SHR: 7.382g, %CPU: 26.9, %MEM: 199</p>
  
  <p>JVM parameters:</p>
  
  <pre><code>-Xmx3296m -Xms1977m -Xss256k
  -XX:MetaspaceSize=128m 
  -XX:MaxMetaspaceSize=256m 
  -XX:+UnlockExperimentalVMOptions
  -XX:+UseZGC 
  -XX:MinHeapFreeRatio=50
  -XX:MaxHeapFreeRatio=80 
  </code></pre>
  
  <p>After turning off ZGC, shared memory uses only 33K as below.</p>
  
  <p>VIRT: 29g, RES: 1.5g, SHR: 33564, %CPU: 26, %MEM: 39.</p>