title: What is the difference between xmx and MaxRAM JVM parameters?
body: <p><a href="https://stackoverflow.com/a/27825475/1251549">MaxRAM</a>:</p>
  
  <blockquote>
    <p>based on the amount of memory on the machine. The proportion of memory to use for the heap is controlled by the command-line options InitialRAMFraction and MaxRAMFraction
    [...]
    The value of MaxRAM is platform-dependent.</p>
  </blockquote>
  
  <p><a href="https://stackoverflow.com/a/5374501/1251549">Xmx</a>:</p>
  
  <blockquote>
    <p>-Xmxn
    Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. The upper limit for this value will be approximately 4000m on Solaris 7 and Solaris 8 SPARC platforms and 2000m on Solaris 2.6 and x86 platforms, minus overhead amounts.</p>
  </blockquote>
  
  <p>As I understand both define <code>heap</code> size. No? What is recommended to use: <code>Xmx</code> or <code>MaxRAM</code>? If I use both which one ovverides another?</p>