博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Kernel parameters for Db2 database server installation (Linux and UNIX)
阅读量:6330 次
发布时间:2019-06-22

本文共 5283 字,大约阅读时间需要 17 分钟。

Db2 11.1

For root installations, the database manager uses a formula to automatically adjust kernel parameter settings and eliminate the need for manual updates to these settings.

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 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) 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. TheDb2 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, data servers frequently have 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, which is specified in bytes by MSGMNB. You can view message queue usage 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.
    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
    • Beginning with the first section 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 shared memory pages on a system.
      • It is recommended to set the SHMMAX value to be equal to the amount of physical memory on your system. However, the minimum that is required on x86 systems is 268435456 (256 MB) and for 64-bit systems, it is 1073741824 (1 GB).
    • The next section covers the amount of semaphores available to the operating system. The kernel parameter semconsists of four tokens, SEMMSL, SEMMNS, SEMOPM, and SEMMNI. SEMMNS is the result of SEMMSL multiplied bySEMMNI. The database manager requires that the number of arrays (SEMMNI) be increased as necessary. Typically, SEMMNI must be twice the maximum number of agents expected on the system multiplied by the number of logical partitions on the database server computer plus the number of local application connections on the database server computer.
    • The third section covers messages on the system.
      • The MSGMNI parameter affects the number of agents that can be started. The MSGMAX parameter affects the size of the message that can be sent in a queue, and the MSGMNB parameter affects the size of the queue.
      • The MSGMAX parameter must be changed to 64 KB (that is, 65536 bytes), and the MSGMNB parameter must be increased to 65536.
  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 must be placed into the file:
    #Example for a computer with 16GB of RAM:kernel.shmmni=4096kernel.shmmax=17179869184kernel.shmall=8388608#kernel.sem=
    kernel.sem=250 1024000 32 4096kernel.msgmni=16384kernel.msgmax=65536kernel.msgmnb=65536
    copy to clipboard
  4. Run sysctl with -p parameter to load in sysctl settings from the default file /etc/sysctl.conf:
    sysctl -p
    copy to clipboard
  5. Optional: 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.

转载于:https://www.cnblogs.com/dahaoran/p/9192617.html

你可能感兴趣的文章
php 分析Session无效的原因
查看>>
【原创】不一样的成功启示录----读《异类》有感
查看>>
python 高阶函数 与关键字参数
查看>>
js获取网页高度(详细整理)
查看>>
tm查看
查看>>
组合数学题 Codeforces Round #108 (Div. 2) C. Pocket Book
查看>>
Linux 小知识翻译 - 「别名」
查看>>
TQL
查看>>
类反射,代理
查看>>
hdu 4357 2012 多校 - 6
查看>>
java学习之借书系统
查看>>
C#中二进制、八进制、十六进制和十进制之间的相互转化问题
查看>>
【杭电ACM】1.2.1 Biker's Trip Odometer
查看>>
数值优化(七)
查看>>
前端性能优化的14个规则
查看>>
struts2的一些小问题
查看>>
检查链表中是否有环
查看>>
Linux-DNS(主DNS+辅助DNS)配置图文速览 (转载)
查看>>
git的简单应用
查看>>
centos7 搭建 mysql8
查看>>