An important tuning flag for OpenDJ with 64bit JVM…

If you’re running OpenDJ with a 64bit JVM with less than 32GB of heap size, be aware of the need to explicitly set the -XX:+UseCompressedOops option (unless you want to disable it).

Compressed oops is supported and enabled by default in Java SE 6u23 and later, when running a 64bit JBM with a value of -Xmx lower than 32GB. You can find more information about Compressed Oops in Java technical notes here: http://download.oracle.com/javase/7/docs/technotes/guides/vm/performance-enhancements-7.html

However, OpenDJ internal database, in order to estimate properly the occupation of the DB cache and tune the cache eviction threads, needs to take into account the compressed oops option. For this is relies on the JVM option to be set explicitly. If the option is not explicitly set, the database may consider the cache full when it’s not, and run cache eviction too early, resulting in less optimized performances.

So, with 64bit JVM, make sure you add the -XX:+UseCompressedOops option to the start-ds line in the config/java.properties file. Then run bin/dsjavaproperties and restart OpenDJ to benefit from the new settings.

6 thoughts on “An important tuning flag for OpenDJ with 64bit JVM…

  1. Francesco 25 September 2013 / 23:52

    Does this apply to a specific OpenDJ version or is it common to all versions running on 64 bit JVMs?

    • Ludo 01 October 2013 / 21:24

      AFAIK, it’s applicable to all revision of OpenDJ with 64 bit JVM, with heap size lower than 32GB.

  2. sas 23 December 2014 / 22:51

    Does this apply to jdk8. I noticed jdk8 does not have -XX:+UseCompressedOops option compatible.

    • Ludo 27 January 2015 / 21:28

      I believe it still applies to JDK8. The flag is only applicable to 64-bit JVM though.

  3. Brad 23 June 2017 / 05:41

    Just to clarify, from here: https://docs.oracle.com/javase/8/docs/technotes/guides/vm/performance-enhancements-7.html

    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.

    • Ludo 23 June 2017 / 11:27

      Yes, things have changed with the latest versions of Java. The original article was written in 2011…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s