7 Common Migration Issues and Solutions

This topic describes some common issues that can occur while migrating from Oracle JRockit to HotSpot, along with their 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 Notes

Performance degradation after migrating to JDK 7.

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

-XX:+ReserveCodeMemory

Default values:

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

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

-XX:ReservedCodeCacheSize

The default value on most of the platforms is 48 MB.

With HotSpot VM, it was observed that in some cases increasing the 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)

The 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 or synchronization after migrating to HotSpot, then disabling this option might provide some performance gains.