设置参数

ast login: Mon May 14 15:32:24 2018 from 10.153.4.18
[root@centos65-min-template ~]# ll
total 24
-rw-------. 1 root root 1211 Jan  5 08:40 anaconda-ks.cfg
-rw-r--r--. 1 root root 9458 Jan  5 08:40 install.log
-rw-r--r--. 1 root root 3161 Jan  5 08:39 install.log.syslog
-rw-------. 1 root root  624 May 11 08:32 nohup.out
[root@centos65-min-template ~]# sysctl -w fs.file-max=2097152
fs.file-max = 2097152
You have new mail in /var/spool/mail/root
[root@centos65-min-template ~]# sysctl -w fs.nr_open=2097152
fs.nr_open = 2097152
[root@centos65-min-template ~]# echo 2097152 > /proc/sys/fs/nr_open
[root@centos65-min-template ~]# ulimit -n 1048576
[root@centos65-min-template ~]# vim /etc/security/limits.conf
You have new mail in /var/spool/mail/root
[root@centos65-min-template ~]# sysctl -w net.core.somaxconn=32768
net.core.somaxconn = 32768
[root@centos65-min-template ~]# sysctl -w net.ipv4.tcp_max_syn_backlog=16384
net.ipv4.tcp_max_syn_backlog = 16384
[root@centos65-min-template ~]# sysctl -w net.core.netdev_max_backlog=16384
net.core.netdev_max_backlog = 16384
[root@centos65-min-template ~]# sysctl -w net.ipv4.ip_local_port_range='1000 65535'
net.ipv4.ip_local_port_range = 1000 65535
[root@centos65-min-template ~]# sysctl -w net.core.rmem_default=262144
net.core.rmem_default = 262144
[root@centos65-min-template ~]# sysctl -w net.core.wmem_default=262144
net.core.wmem_default = 262144
[root@centos65-min-template ~]# sysctl -w net.core.rmem_max=16777216
net.core.rmem_max = 16777216
[root@centos65-min-template ~]# sysctl -w net.core.wmem_max=16777216
net.core.wmem_max = 16777216
[root@centos65-min-template ~]# sysctl -w net.core.optmem_max=16777216
net.core.optmem_max = 16777216
[root@centos65-min-template ~]# sysctl -w net.ipv4.tcp_rmem='1024 4096 16777216'
net.ipv4.tcp_rmem = 1024 4096 16777216
[root@centos65-min-template ~]# sysctl -w net.ipv4.tcp_wmem='1024 4096 16777216'
net.ipv4.tcp_wmem = 1024 4096 16777216
[root@centos65-min-template ~]# sysctl -w net.nf_conntrack_max=1000000
net.nf_conntrack_max = 1000000
[root@centos65-min-template ~]# sysctl -w net.netfilter.nf_conntrack_max=1000000
net.netfilter.nf_conntrack_max = 1000000
[root@centos65-min-template ~]# sysctl -w net.netfilter.nf_conntrack_tcp_timeout_time_wait=30
net.netfilter.nf_conntrack_tcp_timeout_time_wait = 30
[root@centos65-min-template ~]# sysctl -w  net.ipv4.tcp_max_tw_buckets=1048576
net.ipv4.tcp_max_tw_buckets = 1048576
You have new mail in /var/spool/mail/root
[root@centos65-min-template ~]# net.ipv4.tcp_fin_timeout = 15
-bash: net.ipv4.tcp_fin_timeout: command not found
[root@centos65-min-template ~]#  sysctl -w  net.ipv4.tcp_fin_timeout = 15
error: "net.ipv4.tcp_fin_timeout" must be of the form name=value
error: Malformed setting "="
error: "15" must be of the form name=value
[root@centos65-min-template ~]# sysctl -w net.ipv4.ip_local_port_range="500 65535"
net.ipv4.ip_local_port_range = 500 65535
[root@centos65-min-template ~]# echo 1000000 > /proc/sys/fs/nr_open
[root@centos65-min-template ~]# echo 2097152 > /proc/sys/fs/nr_open
You have new mail in /var/spool/mail/root
[root@centos65-min-template ~]# 
阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页