title: Regarding memory usage of Java Application
body: <p>I have a question regarding memory usage of java web applications..</p>
  
  <p>In Task manager,  Tomcat service seems to occupy <strong>8,677,544,000</strong> Bytes of memory</p>
  
  <p>In jvisualvm, memory usage of java application deployed under that tomcat is as follows</p>
  
  <pre><code>Heap: 
  Used: 2,304,233,184 B
  Size: 8,589,934,592 B
  Max: 10,737,418,240 B
  
  Permgen:
  Used:  80,272,056 B
  Size: 536,870,912 B
  Max:  536,870,912 B
  </code></pre>
  
  <p>Memory Parameters in Tomcat's Service.bat file: </p>
  
  <pre><code>-Xms8192m;-Xmx10240m;-XX:PermSize=512m;-XX:MaxPermSize=512m
  </code></pre>
  
  <p>Now, my question is no matter what I set MaxHeapFreeRatio the free space is not shrinking even though the used space is shrinking at times.</p>
  
  <p>Can anyone, kindly tell me why is this behaving like this.. Is there a way to shrink the free space so that other processes runnning on the system can utilize it?</p>
  
  <p>I am using latest versions of JDK 1.7 &amp; Tomcat 7.</p>