什么样的影响,如果有的话,请问-d64开关已经在Sun JVM驻留内存使用情况? [英] What impact, if any, does the -d64 switch have on Sun JVM resident memory usage?

查看:228
本文介绍了什么样的影响,如果有的话,请问-d64开关已经在Sun JVM驻留内存使用情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个web应用程序,需要一些内存调整。虽然我已经分析应用程序本身和修剪下来的东西,JVM本身似乎过于臃肿我在我们最繁忙的实例。 (下卷实例没有这个问题。)详细:

I've got this webapp that needs some memory tuning. While I'm already profiling the application itself and trimming things down, the JVM itself seems overly bloated to me on our busiest instance. (The lower volume instances do not have this problem.) The details:

  • 平台:
    • RHEL4 64位(的Linux 2.6.9-78.0.5.ELsmp#1 SMP的x86_64
    • 的Sun Java 6(的Java HotSpot的(TM)64位服务器虚拟机(建设10.0 - B23,混合模式),
    • 在Tomcat的6 -d64 startup.sh
    • Platform:
      • RHEL4 64-bit (Linux 2.6.9-78.0.5.ELsmp #1 SMP x86_64)
      • Sun Java 6 (Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode))
      • Tomcat 6 with -d64 in startup.sh

      如果我可以重构出需要一个64位JVM,并删除 -d64 开关,就会使JVM的驻留内存占用更小?换句话说...

      If I could refactor out the need for a 64-bit JVM, and drop the -d64 switch, would that make the JVM's resident memory footprint smaller? In other words...

      如果有的话,请问有什么影响, -d64 开关已经在Sun JVM驻留内存使用情况?

      What impact, if any, does the -d64 switch have on the Sun JVM resident memory usage?

      推荐答案

      在D64开关的使用得到了JVM到64位模式。从技术上讲,在Solaris / Linux和大多数的Unix,JVM进程将在LP64模型执行。

      Usage of the d64 switch gets the JVM into the 64-bit mode. Technically, on Solaris/Linux and most Unixes, the JVM process will execute in the LP64 model.

      LP64模型是从32位模型(ILP32)在不同的该指针碰巧是64位宽,而不是32位的指针。对于JVM中,这允许更大的存储器寻址能力,但它也意味着仅通过对象引用所占据的大小倍增。因此对于相同数目的在一个32位JVM给定时间的对象和64位1更大的膨胀。

      The LP64 model is different from the 32-bit model (ILP32) in that pointers happen to be 64 bit wide as opposed to 32 bit pointers. For the JVM, this allows for greater memory addressability, but it also means that the size occupied by the object references alone has doubled. So there is greater bloat for the same number of objects at a given time in a 32-bit JVM and a 64-bit one.

      这是经常被遗忘的另一件事是本身的指令大小。在64位JVM,指令的大小将占据本机机器寄存器大小。

      Another thing that is often forgotten is the size of the instructions themselves. On a 64-bit JVM, the size of the instructions will occupy native machine register size.

      但是,如果您使用 COM pressed对象的指针在64位环境,JVM将连接code和德code指针尽可能堆大小超过4 GB。简单地说,当您使用COM pressed指针,JVM将尝试使用32-bit宽值尽可能。

      If however, you use compressed object pointers in a 64-bit environment, the JVM will encode and decode pointers whenever possible for heap sizes greater than 4 GB. Briefly stated, when you use compressed pointers, the JVM attempts to use 32-bit wide values as much as possible.

      提示:接通UseCom pressedOops标志时,使用的 -XX:+ UseCom pressedOops 以摆脱一些臃肿的。情况因人而异,但人通过报道高达50%的降幅在内存膨胀COM pressed哎呀

      Hint: Switch on the UseCompressedOops flag, using -XX:+UseCompressedOops to get rid of some of the bloat. YMMV, but people have reported upto 50% drop in memory bloat by using compressed oops.

      修改

      的UseCom pressedOops标志被支撑在Java HotSpot虚拟机的14.0版,得自爪哇6更新14起

      这篇关于什么样的影响,如果有的话,请问-d64开关已经在Sun JVM驻留内存使用情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆