title: Java Heap size: why use powers of 2?
body: <p>Most often when I see examples on setting the Java heap size using <code>-Xms</code> and <code>-xmx</code> JVM parameters people use powers of two:</p>
  
  <pre><code>128m, 512m, 1024m, etc.
  </code></pre>
  
  <p>Is there actually a reason for this? Is this beneficial to the JVM performance in some way? Or is this simply done because programmers tend to like powers of 2? (Or because the default value is 64m?)</p>
  
  <p>P.S.
  Of course I know that you can use essentially any number you want (<code>-Xmx666</code>). But people tend to use powers of 2.</p>