title: Does and increasing resident memory size in the JVM indicate a memory leak?
body: <p>I am starting up a JBoss 4.2 server instance with the following command-line options:</p>
  
  <p>-Xms8192m -Xmx8192m -XX:+DisableExplicitGC -XX:MaxPermSize=512m</p>
  
  <p>I have NOT received an OutOfMemoryException but I would not expect the memory usage to increase if things are being GC'd as their references die.  The resident memory usage (as measured with top) starts at ~ 4.2G and steadily increases over the next few days to a week until it hits 8.4G.  I still do not receive an Exception.  My concern is that during periods of significant activity (JBoss Messaging processing > 10k mssgs/sec) there are processing lags of ~100-700ms that occur every 6-10 seconds.  This also seems to correlate with a rise in resident memory usage.  This is occurring on a machine with 2 quad-core processors and 32G of memory.</p>
  
  <p>I will be turning on the additional command-line parameters:</p>
  
  <p>-verbosegc -XX:+PrintGCDetails</p>
  
  <p>But, I would like to know if this seems to be a garbage collection issue, or a memory leak?  I have tried to track down a potential memory leak for a couple weeks and have found things with the XML processing that I thought would definitely fix it, but that was a dead-end.  Does the resident memory usage climb to meet the value of Xmx regardless of whether there is a leak or not (especially with explicit GC disabled)?  Are there some other garbage collection parameters that may help if it is indeed not a leak (such as modifying garbage collector types, survivor ratios, or pause targets)?</p>
  
  <p>I know 100-700ms delays do not seem like much but it has the potential to make a significant difference in this application.  Thanks in advance for any help/suggestions you can offer.</p>