Centos 高并发下可能用到的配置

Centos 高并发下可能用到的配置, 配置 /etc/sysctl.conf 文件

###############customize config###################
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_max_syn_backlog = 819200
net.ipv4.tcp_max_tw_buckets = 200000
net.nf_conntrack_max = 1000000
net.netfilter.nf_conntrack_max = 1000000
net.netfilter.nf_conntrack_tcp_timeout_established = 180
net.netfilter.nf_conntrack_tcp_timeout_time_wait = 120
net.netfilter.nf_conntrack_tcp_timeout_close_wait = 60
net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 120
net.ipv4.ip_local_port_range = 2000 65000
net.core.somaxconn = 32768
fs.file-max=2097152 
fs.nr_open=2097152
net.core.netdev_max_backlog=819200

net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=16777216
net.core.wmem_max=16777216
net.core.optmem_max=16777216
net.ipv4.tcp_rmem=1024 4096 16777216
net.ipv4.tcp_wmem=1024 4096 16777216

##############customize end###############

上一篇: Centos7 安装 open-vswitch图文完整版
下一篇: ieok.com即将关闭

Avatar

porn 评论于: 2020-01-20

Thanks for sharing your thoughts on 高并发. Regards

Avatar

xvxv.site 评论于: 2020-01-20

I'm really impressed with your writing skills as well as with the layout on your blog.
Is this a paid theme or did you modify it yourself? Either 
way keep up the nice quality writing, it is rare to see 
a great blog like this one these days.

Avatar

site 评论于: 2020-01-19

Howdy! This blog post couldn't be written any better! Looking at 
this post reminds me of my previous roommate! He always kept talking about this.
I am going to forward this article to him.

Pretty sure he's going to have a very good read. Thank you for sharing!

Avatar

site 评论于: 2020-01-16

Howdy very cool blog!! Man .. Beautiful .. Wonderful ..
I will bookmark your blog and take the feeds additionally?
I am satisfied to search out numerous useful information here within the 
post, we want work out extra techniques in this regard, thanks 
for sharing. . . . . .
 评论 ( What Do You Think )
名称
邮箱
网址
评论
验证
   
 

 


  • 微信公众号

  • 我的微信

站点声明:

1、一号门博客CMS,由Python, MySQL, Nginx, Wsgi 强力驱动

2、部分文章来源于互联网, 若有侵权, 联系邮箱:summer@yihaomen.com, 同时欢迎大家注册用户,主动发布文章.

3、鄂ICP备14001754号-3, 鄂公网安备 42280202422812号