<bdo id='zadNJ'></bdo><ul id='zadNJ'></ul>
  1. <tfoot id='zadNJ'></tfoot>

  2. <legend id='zadNJ'><style id='zadNJ'><dir id='zadNJ'><q id='zadNJ'></q></dir></style></legend>
    1. <small id='zadNJ'></small><noframes id='zadNJ'>

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

      -Xms 和 -Xmx 标志是否保留了机器的资源?

      Do the -Xms and -Xmx flags reserve the machine#39;s resources?(-Xms 和 -Xmx 标志是否保留了机器的资源?)
        <bdo id='RBS9i'></bdo><ul id='RBS9i'></ul>

        • <tfoot id='RBS9i'></tfoot>

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

              <tbody id='RBS9i'></tbody>

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

                <legend id='RBS9i'><style id='RBS9i'><dir id='RBS9i'><q id='RBS9i'></q></dir></style></legend>
              • 本文介绍了-Xms 和 -Xmx 标志是否保留了机器的资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我知道JVM进程的-Xms标志是允许JVM进程使用特定数量的内存来初始化它的进程.而关于Java应用程序的性能,通常建议在启动应用程序时将-Xms-Xmx设置为相同的值,例如-Xms2048M -Xmx2048M.

                I know that the -Xms flag of JVM process is to allow the JVM process to use a specific amount of memory to initialize its process. And in regard to performance of a Java application, it is often recommended to set the same values to both -Xms and -Xmx when starting the application, like -Xms2048M -Xmx2048M.

                我很好奇 -Xms-Xmx 标志是否意味着 JVM 进程预留了特定数量的内存以防止同一进程中的其他进程机器不要使用它.

                I'm curious whether the -Xms and -Xmx flags mean that the JVM process makes a reservation for the specific amount of memory to prevent other processes in the same machine from using it.

                是这样吗?

                推荐答案

                Xmx 只是保留虚拟地址空间.Xms 实际上分配(提交)它,但不一定预先设置它.

                Xmx merely reserves virtual address space. Xms actually allocates (commits) it but does not necessarily prefault it.

                操作系统对分配的响应方式各不相同.

                How operating systems respond to allocations varies.

                Windows 确实允许您保留非常大的地址空间块 (Xmx),但不允许过度使用 (Xms).限制由交换 + 物理定义.例外情况是大页面(需要通过组策略设置启用),这将受到物理内存的限制.

                Windows does allow you to reserve very large chunks of address space (Xmx) but will not allow overcommit (Xms). The limit is defined by swap + physical. The exception are large pages (which need to be enabled with a group policy setting), which will limit it by physical ram.

                Linux 行为更复杂,它取决于 vm.overcommit_memory 和相关的 sysctls 以及传递给 mmap 系统调用,在某种程度上可以通过 JVM 配置标志来控制.行为范围从 a) Xms 可以超过总内存 + 交换到 b) Xmx 被可用的物理内存限制.

                Linux behavior is more complicated, it depends on the vm.overcommit_memory and related sysctls and various flags passed to the mmap syscall, which to some extent can be controlled by JVM configuration flags. The behavior can range from a) Xms can exceed total ram + swap to b) Xmx is capped by available physical ram.

                这篇关于-Xms 和 -Xmx 标志是否保留了机器的资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Bytecode features not available in the Java language(Java 语言中不可用的字节码功能)
                ClassCastException because of classloaders?(ClassCastException 因为类加载器?)
                How can I add a Javaagent to a JVM without stopping the JVM?(如何在不停止 JVM 的情况下将 Javaagent 添加到 JVM?)
                Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )(无法在 32 位 JVM 上加载 64 位 SWT 库(替换 SWT 文件))
                Encourage the JVM to GC rather than grow the heap?(鼓励 JVM 进行 GC 而不是增加堆?)
                Why a sawtooth shaped graph?(为什么是锯齿形图形?)
                  <tfoot id='mN2qQ'></tfoot>
                  <i id='mN2qQ'><tr id='mN2qQ'><dt id='mN2qQ'><q id='mN2qQ'><span id='mN2qQ'><b id='mN2qQ'><form id='mN2qQ'><ins id='mN2qQ'></ins><ul id='mN2qQ'></ul><sub id='mN2qQ'></sub></form><legend id='mN2qQ'></legend><bdo id='mN2qQ'><pre id='mN2qQ'><center id='mN2qQ'></center></pre></bdo></b><th id='mN2qQ'></th></span></q></dt></tr></i><div id='mN2qQ'><tfoot id='mN2qQ'></tfoot><dl id='mN2qQ'><fieldset id='mN2qQ'></fieldset></dl></div>

                      <tbody id='mN2qQ'></tbody>

                    <legend id='mN2qQ'><style id='mN2qQ'><dir id='mN2qQ'><q id='mN2qQ'></q></dir></style></legend>
                  1. <small id='mN2qQ'></small><noframes id='mN2qQ'>

                        • <bdo id='mN2qQ'></bdo><ul id='mN2qQ'></ul>