• <small id='NjF85'></small><noframes id='NjF85'>

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

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

      <tfoot id='NjF85'></tfoot>
      • <bdo id='NjF85'></bdo><ul id='NjF85'></ul>

        Java heap Xms 和 linux free memory 不同

        Java heap Xms and linux free memory different(Java heap Xms 和 linux free memory 不同)

          <tbody id='uE5VB'></tbody>

            <tfoot id='uE5VB'></tfoot>

          • <small id='uE5VB'></small><noframes id='uE5VB'>

              <legend id='uE5VB'><style id='uE5VB'><dir id='uE5VB'><q id='uE5VB'></q></dir></style></legend>
                <bdo id='uE5VB'></bdo><ul id='uE5VB'></ul>
                  <i id='uE5VB'><tr id='uE5VB'><dt id='uE5VB'><q id='uE5VB'><span id='uE5VB'><b id='uE5VB'><form id='uE5VB'><ins id='uE5VB'></ins><ul id='uE5VB'></ul><sub id='uE5VB'></sub></form><legend id='uE5VB'></legend><bdo id='uE5VB'><pre id='uE5VB'><center id='uE5VB'></center></pre></bdo></b><th id='uE5VB'></th></span></q></dt></tr></i><div id='uE5VB'><tfoot id='uE5VB'></tfoot><dl id='uE5VB'><fieldset id='uE5VB'></fieldset></dl></div>
                  本文介绍了Java heap Xms 和 linux free memory 不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个在 centos Box 中运行的 java 程序.我的 -Xmx 和 -Xms 设置为 4000 Mb.

                  I have a java program running in centos Box. My -Xmx and -Xms set to 4000 Mb.

                  程序运行良好.

                  但是当我执行 free -m 时,已用内存显示为 506 MB.根据我的理解,XMS内存应该是为JVM保留的.为什么free命令不显示java使用的内存?

                  But when i do free -m , the used memory is showing as 506 MB. As per my understanding , XMS memory should be reserved for JVM.Why does free command not showing the java used memory ?

                  我也完成了 jstat -gccapacity $(pidof java) 并且 NGCMN 和 NGCMX 更新并且具有相同的值?任何支持都会有所帮助.我正在运行我的程序 java -Xms41000m -Xmx42000m -jar

                  I have also done jstat -gccapacity $(pidof java) and there NGCMN and NGCMX updated and have the same value ? Any support would be helpful. I'm running my program as java -Xms41000m -Xmx42000m -jar

                  推荐答案

                  即使 -Xmx-Xms 设置为相同的值,也会为 Java Heap 保留空间不会立即分配到 RAM 中.

                  Even when -Xmx and -Xms set to the same value, the space reserved for Java Heap is not immediately allocated in RAM.

                  操作系统通常会延迟分配物理内存,仅在第一次访问虚拟页面时.因此,虽然没有触及 Java Heap 的未使用部分,但它不会真正消耗内存.

                  Operating System typically allocates physical memory lazily, only on the first access to a virtual page. So, while unused part of Java Heap is not touched, it won't really consume memory.

                  你可以使用 -XX:+AlwaysPreTouch 选项在 JVM 启动时强制触摸所有堆页面.

                  You may use -XX:+AlwaysPreTouch option to forcibly touch all heap pages on JVM start.

                  这篇关于Java heap Xms 和 linux free memory 不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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?(为什么是锯齿形图形?)
                    • <bdo id='dE6pY'></bdo><ul id='dE6pY'></ul>
                    • <i id='dE6pY'><tr id='dE6pY'><dt id='dE6pY'><q id='dE6pY'><span id='dE6pY'><b id='dE6pY'><form id='dE6pY'><ins id='dE6pY'></ins><ul id='dE6pY'></ul><sub id='dE6pY'></sub></form><legend id='dE6pY'></legend><bdo id='dE6pY'><pre id='dE6pY'><center id='dE6pY'></center></pre></bdo></b><th id='dE6pY'></th></span></q></dt></tr></i><div id='dE6pY'><tfoot id='dE6pY'></tfoot><dl id='dE6pY'><fieldset id='dE6pY'></fieldset></dl></div>
                      <legend id='dE6pY'><style id='dE6pY'><dir id='dE6pY'><q id='dE6pY'></q></dir></style></legend>

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

                            <tfoot id='dE6pY'></tfoot>
                              <tbody id='dE6pY'></tbody>