0 Replies Latest reply on Dec 6, 2011 2:37 AM by Greybird-Oracle

    Warning on Compressed Oops

    Greybird-Oracle
      All,

      Please be aware of a potential problem with the JE cache and the Java compressed oops feature.

      The summary is: Always explicitly specify XX:+UseCompressedOops when running with a heap size of 32 GB or less.

      The Java compressed oops feature is described here:

      http://download.oracle.com/javase/7/docs/technotes/guides/vm/performance-enhancements-7.html

      Note that compressed oops is enabled by default by Java in many cases:
      Compressed oops is supported and enabled by default in Java SE 6u23 and later. In Java SE 7, use of compressed oops is the default for 64-bit JVM processes when -Xmx isn't specified and for values of -Xmx less than 32 gigabytes. For JDK 6 before the 6u23 release, use the -XX:+UseCompressedOops flag with the java command to enable the feature.
      This means that compressed oops is in effect in many cases, even you do not specify XX:+UseCompressedOops (unless you specify XX:-UseCompressedOops, with a minus instead of a plus). However, JE cache sizing does not take into account compressed oops unless it is explicitly specified using XX:+UseCompressedOops.

      JE cache memory will be wasted when compressed oops is used by the JVM, but this is not detected by JE because XX:+UseCompressedOops was not specified. In this case, JE will assume that the cache is full when it is not nearly full and cache eviction will begin prematurely.

      Therefore, always explicitly specify XX:+UseCompressedOops when running with a heap size of 32 GB or less.

      --mark