Sun GlassFish Enterprise Server v2.1.1 Performance Tuning Guide

Rebasing DLLs on Windows

When the JVM initializes, it tries to allocate its heap using the -Xms setting. The base addresses of Application Server DLLs can restrict the amount of contiguous address space available, causing JVM initialization to fail. The amount of contiguous address space available for Java memory varies depending on the base addresses assigned to the DLLs. You can increase the amount of contiguous address space available by rebasing the Application Server DLLs.

To prevent load address collisions, set preferred base addresses with the rebase utilty that comes with Visual Studio and the Platform SDK. Use the rebase utility to reassign the base addresses of the Application Server DLLs to prevent relocations at load time and increase the available process memory for the Java heap.

There are a few Application Server DLLs that have non-default base addresses that can cause collisions. For example:

Move these libraries near the system DLLs (msvcrt.dll is at 0x78000000) to increase the available maximum contiguous address space substantially. Since rebasing can be done on any DLL, rebase to the DLLs after installing the Application Server.

ProcedureTo rebase the Application Server’s DLLs

Before You Begin

To perform rebasing, you need:

  1. Make install_dir\ bin the default directory.

    cd install_dir\bin
  2. Enter this command:

    rebase -b 0x6000000 *.dll
  3. Use the dependencywalker utility to make sure the DLLs were rebased correctly.

    For more information, see the Dependency Walker website.

  4. Increase the size for the Java heap, and set the JVM Option accordingly on the JVM Settings page in the Admin Console.

  5. Restart the Application Server.

Example 4–2 Heap Configuration on Windows

This is an example heap configuration used by Sun GlassFish Enterprise Server for heavy server-centric applications, on Windows, as set in the domain.xml file.

<jvm-options> -Xms1400m </jvm-options>
<jvm-options> -Xmx1400m </jvm-options>

See Also

For more information on rebasing, see MSDN documentation for rebase utility.