DB2 Version 9.7 for Linux, UNIX, and Windows

Kernel parameter requirements ( Linux )

Starting with Version 9.7 Fix Pack 2, the database manager uses a new formula to automatically adjust kernel parameter settings, eliminating the need for manual updates. For earlier fix pack versions, you must manually update the kernel parameter settings.

Interprocess communication kernel parameters

When instances are started, if an interprocess communication (IPC) kernel parameter is below the enforced minimum value, the database manager updates it to enforced minimum value. The IPC kernel parameter values changed when a DB2® instance is started do not persist when the system is rebooted. After a reboot, kernel settings might be lower than the enforced values until a DB2 instance is started. By adjusting any kernel parameter settings, the database manger prevents unnecessary resource errors.

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

If you are updating from Version 9.7 Fix Pack 1 or earlier, you must manually increase certain kernel parameter settings. The following table lists the enforced minimum settings for Version 9.7 Fix Pack 1 or earlier, and the enforced minimum settings for Version 9.7 Fix Pack 2 and later fix packs.
Table 1. Enforced minimum settings for Linux interprocess communication kernel parameters
IPC kernel parameter Enforced minimum setting for Version 9.7 Fix Pack 1 or earlier Enforced minimum setting for Version 9.7 Fix Pack 2 or later fix packs
kernel.shmmni (SHMMNI) no value is enforced 256 * <size of RAM in GB>
kernel.shmmax (SHMMAX)

268 435 456 (32-bit kernel)
1 073 741 824 (64-bit kernel)

<size of RAM in bytes>1
kernel.shmall (SHMALL) no value is enforced 2 * <size of RAM in the default system page size>2
kernel.sem (SEMMNI) 1 024 256 * <size of RAM in GB>
kernel.sem (SEMMSL) no value is enforced 250
kernel.sem (SEMMNS) no value is enforced 256 000
kernel.sem (SEMOPM) no value is enforced 32
kernel.msgmni (MSGMNI) 1 024 1 024 * <size of RAM in GB>
kernel.msgmax (MSGMAX) 65 536 65 536
kernel.msgmnb (MSGMNB) 65 536 65 536 3
  1. On 32-bit Linux operating systems, the enforced minimum setting for SHMMAX is limited to 4 294 967 295 bytes.
  2. SHMALL limits the total amount of virtual shared memory that can be allocated on a system. Each DB2 data server efficiently manages the amount of system memory it consumes, also know as committed memory. The DB2 data server allocates more virtual memory than it commits to support memory preallocation and dynamic memory management. Memory preallocation benefits performance. Dynamic memory management is the process of growing and shrinking real memory usage within separate virtual shared memory areas. To support memory preallocation and dynamic memory management, effectively, it is frequently necessary for data servers to allocate more virtual shared memory on a system than the amount of physical RAM. The kernel requires this value as a number of pages.
  3. Load performance might benefit from a larger message queue size limit, specified in bytes by MSGMNB. You can view message queue usage can by running the ipcs -q command. If the message queues are at capacity, or reaching capacity, during load operations, consider increasing the number of bytes the message queue size limit. Before DB2 Version 9.7 Fix Pack 3, if a message queue became full, the DB2 Version 9.7 load utility failed with SQL2044N. For more information about MSGMNB settings, see APAR IC65152.

Other recommended kernel parameter settings

Other recommended kernel parameter settings are listed in the following table.
Table 2. Configuring other Linux kernel parameters
Recommended kernel parameter setting Configuring the kernel parameters for DB2 data server
vm.swappiness=0 This parameter defines how prone the kernel is to swapping application memory out of physical random access memory (RAM). The default setting is vm.swappiness=60. The recommended kernel parameter setting, vm.swappiness=0, configures the kernel to give preference to keeping application memory in RAM instead of assigning more memory for file caching. This setting avoids unnecessary paging and excessive use of swap space. This setting is especially important for data servers configured to use the self-tuning memory manager (STMM).
vm.overcommit_memory=0 This parameter influences how much virtual memory the kernel permits allocating. The default setting, vm.overcommit_memory=0, sets the kernel to disallow individual processes from making excessively large allocations, however the total allocated virtual memory is unlimited. Having unlimited virtual memory is important for DB2 data servers, which retain additional unused virtual memory allocations for dynamic memory management. Unreferenced allocated memory is not backed by RAM or paging space on Linux systems. Avoid setting vm.overcommit_memory=2, as this setting limits the total amount of virtual memory that can be allocated, which can result in unexpected errors.
kernel.randomize_va_space=0 This parameter configures the kernels use of memory address space layout randomization. Setting the value to 0, kernel.randomize_va_space=0, disables address space layout randomization. DB2 data servers rely on fixed addresses for certain shared memory objects, and the address space layout randomization causes errors for some activities. For additional information, see technote #1365583.