...
Code Block |
---|
# setparam() { val=`cat /proc/sys/${1//.//}`; if [ "$1" = "kernel.sem" ] || [ "$2" -gt "$val" ]; then val="$2"; fi; echo "$1 = $val" >> /etc/sysctl.d/oracle.conf; } echo -n "Memory per DB [GB]: " && read DB_MEM && \ echo -n "DB count: " && read DB_COUNT && \ setparam "kernel.shmall" `echo "$(free -b|grep Mem|awk '{print$2}')/$(getconf PAGE_SIZE)"|bc` && \ setparam "kernel.shmmax" `echo "$DB_COUNT*$DB_MEM*1024*1024*1024*3/2"|bc` && \ setparam "kernel.shmmni" 4096 && \ setparam "kernel.sem" "250 32000 100 128" && \ setparam "fs.file-max" 6815744 && \ setparam "fs.aio-max-nr" 1048576 && \ setparam "net.core.rmem_default" 262144 && \ setparam "net.core.wmem_default" 4194304262144 && \ setparam "net.core.rmem_max" 10485764194304 && \ setparam "net.core.wmem_max" 1048576 && \ sysctl -p /etc/sysctl.d/oracle.conf |
...