Kernel parameter requirements ( Linux DB2)

 

Kernel parameter requirements ( Linux DB2)

https://www.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.qb.server.doc/doc/c0057140.html

 You must have root authority to modify kernel parameters.

  1. Run the ipcs -l command to list the current kernel parameter settings.
   # 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
  1. 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
  1. Run sysctl with -p parameter to load in sysctl settings from the default file /etc/sysctl.conf:
    sysctl -p
  2. 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.
这里对每个参数值做个简要的解释和说明。

(1)shmmax:参数定义了共享内存段的最大值(以字节为单位)。缺省为32M,对于db2oracle来说,该缺省值太低了,设置为RAM内存大小单位byte

即17179869184/1024/1024/1024=16G,

(2)shmmni:参数用于设置系统范围内共享内存段的最大值。该参数的默认值是 4096btyes 。通常不需要更改。

(3)shmall:该参数表示系统一次可以使用的共享内存总量(以页为单位)。缺省值就是2097152,通常不需要修改,设置为RAM的90%。

(4)sem:该参数表示设置的信号量。这4个参数内容大小固定。

(5)file-max:该参数表示文件句柄的最大数量。文件句柄设置表示在linux系统中可以打开的文件数量。

 

 参考配置:

vi /etc/sysctl.conf

#kernel.sem=<SEMMSL> <SEMMNS> <SEMMNS> <SEMOPM> <SEMMNI>

kernel.sem=250 256000 32 1024

kernel.shmmax=1073741824                                  #以64位系统为例的shmmax设置值

kernel.shmall=3774873                                     #以16GB内存为例的90%的shmal设置值

kernel.msgmni=1024kernel.msgmax=65535

kernel.msgmnb=65535

 

 

 

 

 

 

posted @ 2018-07-10 14:49  jiayou64  阅读(354)  评论(0编辑  收藏  举报