oracle hard stack,Linux环境安装Oracle11g(二)——操作系统参数及服务调整

禁用 SELINUX

setenforce 0

sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

getenforce

修改为 DISABLE

关闭Transparent HugePages

修改/etc/grub.conf文件,在Kernel行末尾加上下列参数:

transparent_hugepage=never

IO调度算法调整

修改/etc/grub.conf文件,在Kernel行末尾加上下列参数:

elevator=deadline

可以通过cat /sys/block/sda/queue/scheduler命令来查看目前调度算法。

配置服务

service iptables stop

service iptables save

service ip6tables stop

service ip6tables save

chkconfig avahi-daemon off

chkconfig bluetooth off

chkconfig cpuspeed off

chkconfig cups off

chkconfig firstboot off

chkconfig ip6tables off

chkconfig iptables off

chkconfig pcmcia off

内核参数修改

cat>>/etc/sysctl.conf<

kernel.shmmax = 54050481766

kernel.shmall = 16494898

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 6815744

fs.aio-max-nr = 4194304

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

net.ipv4.ipfrag_high_thresh = 16777216

net.ipv4.ipfrag_low_thresh = 15728640

kernel.randomize_va_space=0

vm.min_free_kbytes = 524288

# vm.nr_hugepages = 512

EOF

最佳配置算法:

#shmmax

echo "`cat /proc/meminfo | grep "MemTotal" | awk '{print $2}'` * 1024 * 0.8" | bc  | sed 's#\..*$##'

#shmall

echo "`cat /proc/meminfo | grep "MemTotal" | awk '{print $2}'` / (`getconf PAGESIZE` / 1024)" | bc

使参数生效

sysctl -p

Limits配置

cat>>/etc/security/limits.conf<

oracle  soft    nproc           2047

oracle  hard    nproc           16384

oracle  soft    nofile          1024

oracle  hard    nofile          65536

oracle  soft    stack           10240

oracle  hard    stack           32768

root    soft    stack           10240

root    hard    stack           32768

*       soft    memlock         unlimited

*       hard    memlock         unlimited

EOF

PAM 调整

echo "session required pam_limits.so" >>/etc/pam.d/login

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值