Sun Java System Application Server Enterprise Edition 8.1 2005Q2 High Availability Administration Guide

Configuring Shared Memory and Semaphores

You must configure shared memory and semaphores before installing HADB. The procedure depends on your operating system.

ProcedureTo configure shared memory and semaphores on Solaris

  1. Log in as root.

  2. Configure shared memeory.

    Set the value of shmmax to the size of the physical memory on the HADB host machine. The maximum shared memory segment size must be larger than the size of the HADB database buffer pool. For example, for a machine with a 2 GByte (0x8000000 hexadecimal) main memory, add the following to the /etc/system file:

    set shmsys:shminfo_shmmax=0x80000000
     set shmsys:shminfo_shmseg=20

    On Solaris 9 and later, shmsys:shminfo_shmseg is obsolete.

    Set shminfo_shmmax to the total memory in your system (in hexadecimal notation the value 0x80000000 shown is for 2 Gigabytes of memory).

    Note –

    Specify the value of shmsys:shminfo_shmmax using the hexadecimal value for the memory size. To determine your host’s memory, use this command:

    prtconf | grep Memory

  3. Configure semaphores.

    Check the /etc/system file for semaphore configuration entries. This file might already contain semmni, semmns, and semmnu entries. For example:

    set semsys:seminfo_semmni=10
    set semsys:seminfo_semmns=60
    set semsys:seminfo_semmnu=30

    If the entries are present, increment the values by adding 16, 128, and 1000 respectively. So, the entries in the example above would change to:

    set semsys:seminfo_semmni=26
    set semsys:seminfo_semmns=188
    set semsys:seminfo_semmnu=1030

    If the /etc/system file does not these entries, add them at the end of the file:

    set semsys:seminfo_semmni=16
    set semsys:seminfo_semmns=128
    set semsys:seminfo_semmnu=1000

    This is sufficient to run up to 16 HADB nodes on the computer. For information on setup for more than 16 nodes, see the HADB chapter in the Sun Java System Application Server Enterprise Edition 8.1 2005Q1 Performance Tuning Guide.

  4. Reboot the machine.

ProcedureTo configure shared memory on Linux

  1. Log in as root.

  2. Edit the file /etc/sysctl.conf

  3. Set the kernel.shmax and kernel.shmall parameters.

    The kernel.shmax parameter defines the maximum size in bytes for a shared memory segment. The kernel.shmall parameter sets the total amount of shared memory in pages that can be used at one time on the system. Set the value of both of these parameters to the amount physical memory on the machine. Specify the value as a decimal number of bytes. For example, for a machine having 512 Mbytes of physical memory:

  4. Reboot the machine. using this command:

    sync; sync; reboot

Procedure for Windows

Windows does not require any special system settings. However, if you want to use an existing J2SE installation, set the JAVA_HOME environment variable to the location where the J2SE is installed.