title: how to choose the jvm heap size?
body: <p>What i usually do concerning the jvm heap size is setting the max value really high to avoid the infamous OutOfMemoryException.</p>
  <p>However, this strategy (or lack of strategy) doesn't seem to be really smart. :-).</p>
  <p>My question is how to choose the min and max values, and the difference between the two (should max-min be small or big?).
  For instance, from <a href="http://download.oracle.com/docs/cd/E13188_01/jrockit/geninfo/diagnos/tune_startup.html" rel="noreferrer">here</a>:</p>
  <blockquote>
  <p>if the initial heap is too small, the
  Java application startup becomes slow
  as the JVM is forced to perform
  garbage collection frequently until
  the heap has grown to a more
  reasonable size. For optimal startup
  performance you should set the initial
  heap size to the same as the maximum
  heap size.</p>
  </blockquote>
  <p>thanks.</p>