This chapter describes various HotSpot command line options and compares them with those available in Oracle JRockit.
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, seehttp://www.oracle.com/technetwork/java/javaseproducts/
.This section can be used as a reference by users who are searching for functionality similar to a specific Oracle JRockit flag they may be familiar with. This section seeks to provide either a one-to-one mapping of Oracle JRockit options to HotSpot options, or refers to the other sections of this document. There may be certain Oracle JRockit options for which there are no corresponding HotSpot JVM options. Some of the mapped HotSpot options may not be exactly equivalent to the Oracle JRockit options and may provide slightly different behavior on the HotSpot.
When migrating, simply translating every option used with Oracle JRockit into similar HotSpot option is not recommended. Especially for performance-related options, the best practice is to start by only specifying the Java heap size and the garbage collector (CMS, G1, and so on). Any additional tuning for HotSpot, if necessary at all, should only be done based off of new benchmarking and profiling done with HotSpot. It is not advised to assume that most, if any, JVM-level tuning decisions made for an Oracle JRockit configuration will also apply as-is to a HotSpot configuration.
See Oracle JRockit Documentation for more information.
Table 6-1 -X Command-Line Options
Oracle JRockit | HotSpot | Added In | Note |
---|---|---|---|
|
SAME |
||
|
SAME |
||
|
SAME |
||
|
SAME |
||
|
SAME |
||
|
-- |
See section on GC for more details. |
|
|
-- |
See section on GC for more details. |
|
|
|
5u5 |
See https://blogs.oracle.com/poonam/entry/uselargepages_on_linux |
|
-- |
See |
|
|
SAME |
||
|
SAME |
||
|
SAME |
Should not use except for troubleshooting. |
|
|
-- |
See section on Compilation Optimization for more details. |
|
|
SAME |
||
|
|
See section on GC for more details. |
|
|
SAME |
||
|
SAME |
||
|
-- |
||
|
|
See section on Logging. |
|
|
-- |
See section on Logging. |
|
|
-- |
See section on Logging. |
|
|
-- |
See section on Logging. |
|
|
SAME |
Table 6-2 -XX Command-Line Options
Oracle JRockit | HotSpot | Note On HotSpot Options |
---|---|---|
|
|
-XX:+AggressiveHeap enables Java heap optimization. This sets various parameters to be optimal for long-running jobs with intensive memory allocation, based on the configuration of the computer (RAM and CPU). By default, the option is disabled and the heap is not optimized.
|
|
Related options:
|
|
|
|
|
|
-- |
|
|
-- |
|
|
-- |
|
|
-- |
|
|
-- |
|
|
|
See section on Runtime options for more details. |
|
Can achieve the same by using |
Sets a custom command or a series of semicolon-separated commands to run when an OutOfMemoryError exception is first thrown. For example:
|
|
SAME |
|
|
-- |
On HotSpot side, there is an option |
|
-- |
|
|
-- |
|
|
Can achieve the same by using |
Sets a custom command or a series of semicolon-separated commands to run when an OutOfMemoryError exception is first thrown. For example:
|
|
-- |
|
|
-- |
|
|
SAME |
|
|
SAME |
Enables the use of the Java Flight Recorder (JFR) during the runtime of the application. This is a commercial feature that requires you to also specify the |
|
SAME |
|
|
-- |
|
|
-- |
|
|
Related options:
|
See GC section for more details. |
|
Related options:
|
See GC section for more details. |
|
-- |
|
|
-- |
|
|
Related options:
|
See section on GC for more details. |
|
Can achieve the same by using |
Example:
|
|
-- |
|
|
-- |
|
|
SAME |
|
- |
SAME |
|
|
-- |
|
|
-- |
|
|
-- |
|
|
-- |
|
|
|
Sets the ratio between eden space size and survivor space size. By default, this option is set to 8. There is another option |
|
-- |
|
|
|
See section on Compilation/Optimization for more details. |
|
SAME |
|
|
|
Sets the ratio between young and old generation sizes. By default, this option is set to 2. |
|
|
See section on Runtime options for more details. |
|
-- |
|
|
-- |
|
|
Related options:
|
See GC section for details. |
|
|
See section on Compilation/Optimization for more details. |
|
Related options:
|
|
|
|
See section on Compilation/Optimization for more details. |
|
-- |
|
|
-- |
|
|
-- |
|
|
SAME |
|
|
|
Sets the initial size (in bytes) of a thread-local allocation buffer (TLAB). If this option is set to 0, then the JVM chooses the initial size automatically. |
|
-- |
|
|
-- |
|
|
Related options:
|
|
|
|
|
|
-- |
|
|
- |
Disables garbage collection (GC) of classes. This can save some GC time, which shortens interruptions during the application run. When you specify |
|
-- |
|
|
-- |
|
|
-- |
|
|
|
See section on Runtime options for more details. |
|
|
See section on Runtime options for more details. |
|
-- |
|
|
-- |
No direct corresponding option available in HotSpot but the low heap base can be specified explicitly using HeapBaseMinAddress option. |
|
SAME |
Only relevant for JDK5. Should not be used on JDK 6 or higher. |
|
SAME |
On HS, enabled by default for Windows. On JR, disabled by default for Windows. |
Oracle JRockit | HotSpot |
---|---|
|
|
|
|
|
|
|
-- |
|
-- |
|
-- |
|
|
|
|
|
|
|
|
l |
-- |
|
-- |
|
-- |
|
|
|
-- |
|
|
|
|
|
|
|
-- |
|
-- |
|
|
|
-- |
|
|
|
|
|
|
|
|
|
-- |
|
-- |
|
|