Setting kernel parameters

This article describes how to change particular operating system kernel parameters on an HP machine to make WebSphere Application Server run effectively. To set kernel parameters, perform the following steps:

  1. Ensure that you are logged into the host machine with superuser (root) privileges.
  2. Determine the machine's physical memory by doing the following. You will need this value when configuring kernel parameters:
    1. Start the HP-UX System Administration Manager (SAM) utility.
    2. Select Performance Monitors, then System Properties.
    3. Click the Memory tab and note the value for Physical Memory.
    4. Click OK and exit from the SAM utility.
  3. In order to set the maxfiles and maxfiles_lim parameters to at least 4096, you must first edit the file /usr/conf/master.d/core-hpux to allow values greater than 2048 to be set by using the SAM utility. Do the following:
    1. Open the file /usr/conf/master.d/core-hpux in a text editor.
    2. Change the line
      *range maxfiles<=2048
      to
      *range maxfiles<=60000
    3. Change the line
      *range maxfiles_lim<=2048
      to
      *range maxfiles_lim<=60000
    4. Save these changes and close the file. The old values for these parameters might still be stored in the file /var/sam/boot.config. To force the SAM utility to create a new boot.config file, do the following:

      1. Move the existing version of the boot.config file located in the directory /var/sam to another location (the /tmp directory, for instance).
      2. Start the SAM utility.
      3. Select Kernel Configuration, then Configurable Parameters. When the Kernel Configuration window opens, a new boot.config file exists.

        Alternatively, you can enter the following command to rebuild the boot.config file:

        # /usr/sam/lbin/getkinfo -b
  4. Set the parameters listed in Table 1 to the values listed by doing the following:
    1. Start the SAM utility.
    2. Select Kernel Configuration, then Configurable Parameters.
    3. Highlight a parameter that you want to change and select Actions, then Modify Configurable Parameter.
    4. Type the new value for the parameter in the Formula/Value field and click OK.
    5. Repeat these steps for each of the parameters listed in Table 1 .
    6. After you have set all of the parameters, select Actions, then Process New Kernel.
    7. An information window opens, confirming your decision to restart the machine. Click Yes.

      If other information windows open, requesting information particular to your installation, follow the on-screen instructions to restart your machine and to enable the new settings to take effect.

      Alternatively, use the HPjconfig configuration utility available from the Java products for HP-UX Web site at www.hp.com/go/java. This pure Java application provides kernel parameter recommendations tailored to your specific Java enterprise services and HP-UX hardware platform. It supports only selected machine types, however. Refer to the information on this Web site to verify that your machine is suppported and for instructions on downloading and installing the utility.

      Table 1

      Parameter
      Value
      maxfiles 4096
      maxfiles_lim 4096
      max_thread_proc 1024
      maxuprc 512
      nproc 1024
      nflocks 8192
      ninode 2048
      nfile 4 * ninode value
      msgseg 32767 (or less)
      msgmnb 65 535
      msgmax 65 535
      msgtql 1024
      msgmap 258
      msgmni 256
      msgssz 16
      semmni 512
      semmap 514
      semmns 1024
      semmnu 1020 (nproc value minus 4)
      shmmax 483 183 821 (Ensure that this parameter is set to 483 183 821 or 90% of the physical memory (in bytes), whichever is higher. For example, if you have 512 MB of physical memory in your system, set shmmax to 483 183 821 (512 * 0.9 * 1024 * 1024).
      shmseg 16
      shmmni 300

  5. If you plan to redirect displays to non-HP machines, do the following before running applications that have a graphical user interface, such as the WebSphere Application Server applications that are started with the scripts install.sh or adminclient.sh:
    1. Enter the following command to obtain information on all public locales accessible to your application:
      # locale -a
    2. Choose a value for your system from the output that is displayed and set the LANG environment variable to this value. Here is an example command that sets the value of LANG to en_US.iso88591:
      # export LANG=en_US.iso88591