7 Common Migration Issues and Solutions

This chapter describes some common issues that can occur while migrating from Oracle JRockit to HotSpot VM, along with their solutions.


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/.

Common Migration Issues and Solutions

The following table lists some common issues that can occur during the migration process and solutions for resolving them.

Table 7-1 Migrations Issues and Solutions

Problem Oracle JRockit Option HotSpot Option Comments

Performance degradation after migrating to JDK7.

Issue was resolved with the use of -XX:ReservedCodeCacheSize=1g


Default values:

  • When you use -XX:+UseLargePagesForCode: 64 MB

  • When you use -XX:-UseLargePagesForCode: 1024 MB


Default value on most of the platforms is 48 MB

With HotSpot VM, it was observed that in some cases increasing ReservedCodeCacheSize value, for example, -XX:ReservedCodeCacheSize=1g, improves the performance significantly.

Increased locking/unlocking events observed after switching to HotSpot.

Disabling UseBiasedLocking helped improve the overall performance.

-XX:-UseLazyUnlocking (to disable)

-XX:-UseBiasedLocking (to disable)

UseBiasedLocking option 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.

If you face performance issues due to locking/synchronization after migrating to HotSpot, turning off this option may provide some performance gains.