title: How do I properly set the permgen size?
body: <p>I have this VM with tomcat, java, and grails in it. I've been getting permgen errors so I looked around and found the solution:</p>
  
  <pre><code>set JAVA_OPTS="-Xms256m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m"
  </code></pre>
  
  <p>I use SSH to access the vm and type the arguments above. I suppose that would fix the problem. Thing is, I wanted to make sure that I did it correctly. So I searched again on how I could check the current permSize and this is the solution I got:</p>
  
  <pre><code>jinfo -flag MaxPermSize 6444
  </code></pre>
  
  <p>6444 is the pid, and as a response, I got this.</p>
  
  <pre><code>-XX:MaxPermSize=85983232
  </code></pre>
  
  <p>Question: Is the value of the maxPermSize in bytes? because, if it is, then that would mean that the java_opts command didn't work. I am expecting to get 512m but 85983232 bytes = 82 mb.. Or am I seeing it wrong..? Can anybody enlighten me on this? D:</p>