title: Why does the JVM consume less memory than -Xms specified?
body: <p>My question is as the title, and I got some knowledge by searching:</p>
  
  <ol>
  <li><p>linux has shared memory
  <a href="https://stackoverflow.com/questions/131303/linux-how-to-measure-actual-memory-usage-of-an-application-or-process">How to measure actual memory usage of an application or process?</a></p></li>
  <li><p>JVM will reserve the amount of memory setted in Xms
  <a href="https://stackoverflow.com/questions/8231829/what-does-the-xms-jvm-mean-in-reference-to-heap-memory">What does the -Xms JVM mean in reference to heap memory?</a></p></li>
  </ol>
  
  <p>But still don't know why, some on can offer some help?   </p>
  
  <p>Here is my test run on Ubuntu12.04(64bit) | JDK 1.7.0_04. and top shows below:</p>
  
  <pre><code>  PID USER      PR  NI  VIRT  RES       SHR S %CPU %MEM    TIME+  COMMAND
   4067 brian     20   0 5316m **262m** 7496 S    0  3.3   0:00.30 java -**Xms4096m** -Xmx4096m Test
   4066 brian     20   0 3182m **256m** 7496 S    0  3.3   0:00.30 java -**Xms2048m** -Xmx2048m Test
   4065 brian     20   0 2114m **252m** 7492 S    0  3.2   0:00.30 java -**Xms1024m** -Xmx1024m Test
   4064 brian     20   0 1314m  **76m** 7584 S    0  1.0   0:00.20 java -**Xms256m** -Xmx256m Test
   4063 brian     20   0 1180m  **51m** 7608 S    0  0.7   0:00.21 java -**Xms128m** -Xmx128m Test
  </code></pre>