title: Am I reading this top command correctly?
body: <p>I'm trying to debug how much of memory my java process consumes. Please correct me if I'm wrong. </p>
  
  <pre><code>  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
  11798 root      20   0 17.354g 6.084g 164456 S  38.9 10.2  12:52.04 java
  </code></pre>
  
  <p>This is the process. And this is how I start that java application</p>
  
  <pre><code>'-server -Xmx10G -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps'
  </code></pre>
  
  <p>As you can see that I'm giving that application 10G of memory. But according to top help page %MEM is the percentage of actual memory usage. In this case, I'm assuming that it's only using 10% of 10G? </p>
  
  <p>The reason I'm asking this because, I might want to reduce the -Xmx down to 3GB if it's only using 1GB, then giving it 10G is going to be a bit of overkill. </p>
  
  <p>My question is, am I correct in assuming that 10% is the actual usage of the memory of that process so I lower -Xmx option so other process can get some more memory. </p>