DB2 Version 9.7 for Linux, UNIX, and Windows

Modifying kernel parameters (Linux)

Starting with Version 9.7 Fix Pack 2, you no longer need to update Linux kernel parameters related to interprocess communication (IPC) for root installations. For Version 9.7 Fix Pack 1 or earlier, the enforced minimum settings for particular kernel parameters might not be sufficient to run a DB2® database system and you might need to update them before installing a DB2 database product. For non-root installs, you must manually update kernel parameters.

Before you begin

You must have root authority to modify kernel parameters.

Procedure

To update kernel parameters on Red Hat and SUSE Linux:

  1. Run the ipcs -l command to list the current kernel parameter settings.
  2. Analyze the command output to determine whether you have to change kernel settings or not by comparing the current values with the enforced minimum settings for Version 9.7 Fix Pack 2 or later fix packs in Kernel parameter requirements ( Linux ). The following text is an example of the ipcs command output with comments added after // to show what the parameter names are:
       # ipcs -l
    
       ------ Shared Memory Limits --------
       max number of segments = 4096               // SHMMNI	
       max seg size (kbytes) = 32768               // SHMMAX
       max total shared memory (kbytes) = 8388608  // SHMALL
       min seg size (bytes) = 1
    
       ------ Semaphore Limits --------
       max number of arrays = 1024                 // SEMMNI
       max semaphores per array = 250              // SEMMSL
       max semaphores system wide = 256000         // SEMMNS
       max ops per semop call = 32                 // SEMOPM
       semaphore max value = 32767
    
       ------ Messages: Limits --------
       max queues system wide = 1024               // MSGMNI
       max size of message (bytes) = 65536         // MSGMAX
       default max size of queue (bytes) = 65536   // MSGMNB
  3. Modify the kernel parameters that you have to adjust by editing the /etc/sysctl.conf file. If this file does not exist, create it. The following lines are examples of what should be placed into the file:
    #Example for a computer with 16GB of RAM:
    kernel.shmmni=4096
    kernel.shmmax=17179869184
    kernel.shmall=8388608
    #kernel.sem=<SEMMSL> <SEMMNS> <SEMOPM> <SEMMNI>
    kernel.sem=250 256000 32 4096
    kernel.msgmni=16384
    kernel.msgmax=65536
    kernel.msgmnb=65536
  4. Run sysctl with -p parameter to load in sysctl settings from the default file /etc/sysctl.conf:
       sysctl -p
  5. To have the changes persist after every reboot:
    • (SUSE Linux) Make boot.sysctl active.
    • (Red Hat) The rc.sysinit initialization script reads the /etc/sysctl.conf file automatically.

    For the most up-to-date requirements for DB2 database products, see http://www.ibm.com/support/docview.wss?uid=swg27038033