title: How can I optimize the memory usage of JVM?
body: <p>I would like to ask if anyone here knows a way how to optimize the memory usage of the JVM?
  We are using a java service wrapper (YAJSW) that invokes the JVM and the physical memory usage is around 40MB. I want to lessen this to let's say 5-10MB. How do I achieve this?</p>
  
  <p>So far, I only have the following configuration:</p>
  
  <p><code>java =-Xmx1024m</code></p>
  
  <p>I have also tried this:</p>
  
  <p><code>java =-Xms1024m -Xmx1024m -XX:NewSize=512m -XX:MaxNewSize=512m -XX:SurvivorRatio=2 -XX:PermSize=256m -XX:MaxPermSize=256m</code></p>
  
  <p>But these configuration settings made no difference at all. What would be the correct configuration settings for this? or, what else do i have to do to optimize this?</p>
  
  <p>Thank in advance for your answers.</p>