3 Runtime

This chapter describes important options that control the runtime behavior of the HotSpot VM.

Note:

Some of the tools described in this document require a commercial license for use in production. To learn more about commercial features and how to enable them, see http://www.oracle.com/technetwork/java/javaseproducts/.

Runtime Options

The following table lists some important equivalent options of the runtime subsystem in Oracle JRockit and HotSpot.

Table 3-1 Runtime Options

Oracle JRockit HotSpot Note

-XX:+UseLazyUnlocking

-XX:+UseBiasedLocking

UseBiasedLocking improves the performance of uncontended synchronization. This option is enabled by default. However If the application has high contended synchronization, then disabling UseBiasedLocking benefits the performance.

-XlargePages

-XX:+UseLargePages

In HotSpot VM, this option is ON by default on Solaris. On Linux, this has been disabled since 7u60 and 8. Use -XX:+UseLargePages to enable the use of large pages on the platforms where it is disabled by default.

It must be noted that -XX:+UseLargePages does not enable the use of large pages in the MetaSpace. To enable this option, add -XX:+UseLargePagesInMetaspace.

-XX:MaxLargePageSize

-XX:LargePageSizeInBytes=size

Sets the maximum size (in bytes) for large pages used for Java heap. By default, the size is set to 0, meaning that the JVM chooses the size for large pages automatically.

-XXcompressedRefs

-XX:+UseCompressedOops

Use of compressed oops is the default for 64-bit HotSpot JVM processes when -Xmx is not specified and for values of -Xmx less than 32 gigabytes.