<legend id='LZ03N'><style id='LZ03N'><dir id='LZ03N'><q id='LZ03N'></q></dir></style></legend>

      <small id='LZ03N'></small><noframes id='LZ03N'>

        <bdo id='LZ03N'></bdo><ul id='LZ03N'></ul>
      <tfoot id='LZ03N'></tfoot>
    1. <i id='LZ03N'><tr id='LZ03N'><dt id='LZ03N'><q id='LZ03N'><span id='LZ03N'><b id='LZ03N'><form id='LZ03N'><ins id='LZ03N'></ins><ul id='LZ03N'></ul><sub id='LZ03N'></sub></form><legend id='LZ03N'></legend><bdo id='LZ03N'><pre id='LZ03N'><center id='LZ03N'></center></pre></bdo></b><th id='LZ03N'></th></span></q></dt></tr></i><div id='LZ03N'><tfoot id='LZ03N'></tfoot><dl id='LZ03N'><fieldset id='LZ03N'></fieldset></dl></div>

      xmlx 和 MaxRAM JVM 参数有什么区别?

      时间:2023-08-24

    2. <legend id='0Wv7K'><style id='0Wv7K'><dir id='0Wv7K'><q id='0Wv7K'></q></dir></style></legend>

          <tbody id='0Wv7K'></tbody>
          <bdo id='0Wv7K'></bdo><ul id='0Wv7K'></ul>
              1. <small id='0Wv7K'></small><noframes id='0Wv7K'>

                <i id='0Wv7K'><tr id='0Wv7K'><dt id='0Wv7K'><q id='0Wv7K'><span id='0Wv7K'><b id='0Wv7K'><form id='0Wv7K'><ins id='0Wv7K'></ins><ul id='0Wv7K'></ul><sub id='0Wv7K'></sub></form><legend id='0Wv7K'></legend><bdo id='0Wv7K'><pre id='0Wv7K'><center id='0Wv7K'></center></pre></bdo></b><th id='0Wv7K'></th></span></q></dt></tr></i><div id='0Wv7K'><tfoot id='0Wv7K'></tfoot><dl id='0Wv7K'><fieldset id='0Wv7K'></fieldset></dl></div>
                <tfoot id='0Wv7K'></tfoot>
                本文介绍了xmlx 和 MaxRAM JVM 参数有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                MaxRAM:

                基于机器上的内存量.用于堆的内存比例由命令行选项 InitialRAMFraction 和 MaxRAMFraction 控制[...]MaxRAM 的值取决于平台.

                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.

                Xmx:

                -Xmxn指定内存分配池的最大大小(以字节为单位).此值必须是大于 2MB 的 1024 的倍数.附加字母 k 或 K 表示千字节,或附加 m 或 M 表示兆字节.默认值为 64MB.此值的上限在 Solaris 7 和 Solaris 8 SPARC 平台上约为 4000m,在 Solaris 2.6 和 x86 平台上约为 2000m,减去开销.

                -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.

                据我了解,两者都定义了 heap 大小.不?推荐使用什么:XmxMaxRAM?如果我同时使用哪一个 ovverides 另一个?

                As I understand both define heap size. No? What is recommended to use: Xmx or MaxRAM? If I use both which one ovverides another?

                推荐答案

                -Xmx 指定堆的精确上限.这是设置堆大小的首选方式.

                -Xmx specifies the precise upper limit for the heap. It is the preferred way to set the heap size.

                -XX:MaxRAM 不直接定义堆大小.相反,在根据人体工程学计算堆限制时,此参数会覆盖物理 RAM 的实际数量.

                -XX:MaxRAM does not define the heap size directly. Instead this parameter overrides the actual amount of physical RAM when calculating the heap limits basing on ergonomics.

                如果设置了 -Xmx,则永远不会使用 MaxRAM.否则最大堆大小估计1

                If -Xmx is set, MaxRAM is never used. Otherwise the maximum heap size is estimated1 as

                MaxHeapSize = MaxRAM * MaxRAMPercentage / 100% (default MaxRAMPercentage=25)
                

                <小时>

                1 实际的算法稍微复杂一些,还要依赖其他参数.


                1 The actual algorithm is a bit more complicated and depends on other parameters.

                这篇关于xmlx 和 MaxRAM JVM 参数有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:任何“重启"的方式JVM? 下一篇:Java中字符串池的底层机制?

                相关文章

                  <small id='CLP35'></small><noframes id='CLP35'>

                1. <tfoot id='CLP35'></tfoot>
                  <legend id='CLP35'><style id='CLP35'><dir id='CLP35'><q id='CLP35'></q></dir></style></legend>

                      <bdo id='CLP35'></bdo><ul id='CLP35'></ul>
                  1. <i id='CLP35'><tr id='CLP35'><dt id='CLP35'><q id='CLP35'><span id='CLP35'><b id='CLP35'><form id='CLP35'><ins id='CLP35'></ins><ul id='CLP35'></ul><sub id='CLP35'></sub></form><legend id='CLP35'></legend><bdo id='CLP35'><pre id='CLP35'><center id='CLP35'></center></pre></bdo></b><th id='CLP35'></th></span></q></dt></tr></i><div id='CLP35'><tfoot id='CLP35'></tfoot><dl id='CLP35'><fieldset id='CLP35'></fieldset></dl></div>