Modifying kernel parameters (Linux)


Before installing a DB2® database system, you should update your Linux® kernel parameters. The default values for particular kernel parameters on Linux are not sufficient when running a DB2 database system.

You must have root authority to modify kernel parameters. To update kernel parameters on Red Hat and SUSE Linux:

  1. Run the ipcs -l command

  2. Analyze the output to determine if there are any necessary changes required for your system. Comments have been added following the // 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. To modify these kernel parameters, edit 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:

    kernel.sem=250 256000 32 1024 #Example shmmax for a 64-bit system kernel.shmmax=1073741824	
    #Example shmall for 90 percent of 16 GB memory kernel.shmall=3774873		
    kernel.msgmax=65535 kernel.msgmnb=65535

  4. Run sysctl with -p parameter to load in sysctl settings from the default file /etc/sysctl.conf:

       sysctl -p

  5. To make the changes effective after every reboot:

Parent topic: An overview of installing your DB2 server product (Linux and UNIX)

Related tasks
Installing DB2 servers using the DB2 Setup wizard (Linux and UNIX )