• nginx单机1w并发设置


    关闭keep-live,提高链接回收

    keeplive_timeout 0; 
    

    events{
    worker_connections 1024;
    }

    more /proc/sys/net/core/somaxconn

    [root@localhost ~]# echo 50000 > /proc/sys/net/core/somaxconn 
    [root@localhost ~]# more /proc/sys/net/core/somaxconn 
    
    [root@localhost conf]# cat /proc/sys/net/ipv4/tcp_tw_recycle 
    0
    [root@localhost conf]# echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle 
    [root@localhost conf]# cat /proc/sys/net/ipv4/tcp_tw_recycle 
    1
    
    [root@localhost conf]# echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse 
    [root@localhost conf]# cat /proc/sys/net/ipv4/tcp_tw_reuse 
    1
    
    [root@localhost conf]# cat /proc/sys/net/ipv4/tcp_syncookies 
    1
    [root@localhost conf]# echo 0 > /proc/sys/net/ipv4/tcp_syncookies
    [root@localhost conf]# cat /proc/sys/net/ipv4/tcp_syncookies 
    0
    
    [root@localhost conf]# ulimit -n
    1024
    [root@localhost conf]# ulimit -n 50000
    [root@localhost conf]# ulimit -n
    50000
    
    work_processes 1;
    worker_rlimit_nofile 10000;
    
  • 相关阅读:
    LeetCode#22 Generate Parentheses
    重传
    数学问题——gcdgcl
    数学问题——十进制转N进制
    数据模型
    IEEE
    格与代数系统
    数据字典
    贪心算法
    群论
  • 原文地址:https://www.cnblogs.com/qinsilandiao/p/10904321.html
Copyright © 2020-2023  润新知