Kernel parameters for DB2 database server installation (Linux and UNIX)

Source: Internet
Author: User
Tags db2 memory usage message queue semaphore

DB2 11.1

For root installations, the Database Manager uses a formula to automatically adjust kernel parameter settings and Eliminat E The need for manual updates to these settings.

Before you beginyou must has 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 has to change kernel settings or not by comparing the current Val UEs with the enforced minimum settings in the following table.
    IPC Kernel parameter Enforced Minimum setting
    Kernel.shmmni (Shmmni) 256 *<size of RAM in GB>
    Kernel.shmmax (Shmmax) <size of RAM in bytes>1
    Kernel.shmall (shmall) 2 * <size of RAM in the default system page size> 2
    Kernel.sem (Semmni) 256 *<size of RAM in GB>
    Kernel.sem (SEMMSL) 250
    Kernel.sem (semmns) 256 000
    Kernel.sem (semopm) 32
    Kernel.msgmni (Msgmni) 1 024 *<size of RAM in GB>
    Kernel.msgmax (Msgmax) 65 536
    KERNEL.MSGMNB (msgmnb) 3 536
    1. On 32-bit Linux operating systems, the enforced minimum setting for SHMMAX are limited to 4 294 967 295 bytes.
    2. shmall limits The total amount of virtual shared memory so can be AL Located on a system. Each db2? data server efficiently manages the amount of system memory it consumes, also kn OW as committed memory. Thedb2 data server allocates more virtual memory than it commits to support memory Preallocatio N 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, data servers frequently has to allocate more V Irtual 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, which are specified in bytes by msgmnb. You can view message queue usage by running the ipcs -q command. IF the message queues is at capacity, or reaching capacity, during load operations, consider increasing the number of byt ES the message queue size limit.
    The following text is a example of the IPCS command output with comments added after-show what the // param Eter names is:
      # ipcs-l------Shared Memory L Imits--------max number of segments = 4096//Shmmni max seg size (Kbytes) = 32768//SH    Mmax Max Total Shared memory (Kbytes) = 8388608//shmall min seg size (bytes) = 1------Semaphore Limits-------- Max number of arrays = 1024x768//Semmni max semaphores per array = +//SEMMSL max SEM Aphores system wide = 256000//semmns max OPS per semop call = +//semopm semaphore Max Val UE = 32767------messages:limits--------max queues System wide = 1024x768//Msgmni max size of Messag E (bytes) = 65536//msgmax default max size of queue (bytes) = 65536//MSGMNB  
    • Beginning with the first sections on shared memory Limits, the SHMMAX limit is the maximum size of a shared memory Segment on a Linux system. The shmall limit is the maximum allocation of the shared memory pages on a system.
      • It is recommended to set the SHMMAX value to being equal to the amount of physical memory on your system. However, the minimum that's required on x86 systems are 268435456 (1 GB) and for 64-bit systems, it's 1073741824 .
    • The next section covers the amount of semaphores available to the operating system. The kernel parametersemconsists of four tokens, semmsl, semmns, semopm, and  semmni. semmns is the result of < span class= "keyword parmname" >semmsl multiplied bysemmni. The database Manager requires that number of arrays (semmni) is increased as necessary. Typically, semmni must be twice the maximum number of agents expected on the SYS TEM multiplied by the number of logical partitions on the database server computer plus the number of local application Co Nnections on the database server computer.
    • the third section covers messages on the system.
      • the  Msgmni parameter affects the number of agents that can is started. The msgmax parameter affects the size of the message that can being sent in a queue, and The msgmnb parameter affects the size of the queue.
      • the msgmax parameter must be changed to 65 KB 536 bytes), and the msgmnb parameter must be increased To 65536.
  3. modify the kernel parameters To adjust by editing The /etc/sysctl.conf file. If This file does not exist, create it. the following lines is examples of what must is placed into the file:
     #Example for a computer with 16GB of ram:kernel.shmmni=4096kernel.shmmax= 17179869184kernel.shmall=8388608#kernel.sem=<semmsl> <SEMMNS> <SEMOPM> <semmni>kernel.sem =250 1024000 4096kernel.msgmni=16384kernel.msgmax=65536kernel.msgmnb=65536  
  4. Run sysctl with- p parameter to load on sysctl settings from the default file /etc/sysctl.conf: /c3>
       sysctl -p
  5. Optional: 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.

Kernel parameters for DB2 database server installation (Linux and UNIX)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.