DB2数据库参数建议(Linux)
内核参数配置:
kernel.shmall=<物理内存的90%,以页为单位> kernel.shmax=<实际的物理内存> kernel.shmmni=16384 kernel.msgmax=192000 kernel.msgmnb=192000 kernel.msgmni=65536 kernel.sem=250 256000 32 256*<RAM大小,以GB计> kernel.randomize_va_space=0 vm.swappiness=0
如上内容添加到/etc/sysctl.conf
执行sysctl -a
用户资源配置:
对实例用户,fence用户,应用用户添加如下限制:
db2inst1 soft nproc 10240 db2inst1 hard nproc 10240 db2inst1 soft nofile 65000 db2inst1 hard nofile 65000 db2inst1 soft stack -1 db2inst1 hard stack -1 db2inst1 soft data -1 db2inst1 hard data -1 db2inst1 soft fsize -1 db2inst1 hard fsize -1 db2inst1 soft rss -1 db2inst1 hard rss -1
以上内存添加到/etc/security/limtis.conf
db2注册变量设置:
db2set DB2_LAOD_COPY_NO_OVERRIDE=nonrecoverable db2set DB2_USE_FAST_PREALLOCATION=ON db2set DB2_MEM_TUNING_RANGE=40,90
DB参数:
db2 update db cfg for <dbname> using logbufsiz 1024 (至少4M)