title: Memory in Tomcat when running Railo/Lucee
body: <p>Im looking at this <a href="http://www.codersrevolution.com/blog/pulling-used-permgen-space-programmatically-in-coldfusionjava" rel="nofollow">post about Pulling Used PermGen Space Programmatically</a> while trying to figure out how to tweak my Railo/Lucee/Tomcat environment arguments and I was wondering if the information that generates can help me?</p>
  
  <p>This is my current output from the code in that post</p>
  
  <blockquote>
    <p>Code Cache (Non-heap memory) 4MB / 48MB </p>
    
    <p>Eden Space (Heap memory) 53MB / 67MB </p>
    
    <p>Survivor Space (Heap memory) 4MB / 8MB </p>
    
    <p>CMS Old Gen (Heap memory) 122MB / 1965MB </p>
    
    <p>CMS Perm Gen (Non-heap memory) 40MB / 1024MB</p>
  </blockquote>
  
  <p>This is from my setenv.sh</p>
  
  <pre><code>JAVA_OPTS="-server -Djava.awt.headless=true -Xms2048m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=1024m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC"
  </code></pre>
  
  <p>This is my current output from <code>free -m</code></p>
  
  <pre><code>             total       used       free     shared    buffers     cached
  Mem:          3750       1997       1752          0        190       1351
  -/+ buffers/cache:        455       3294
  Swap:            0          0          0
  </code></pre>
  
  <p>How can I figure out, or what should I use as my starting points when figuring out my JAVA_OPTS? </p>