• net.ipv4.tcp_max_tw_buckets=10


    这个参数表示操作系统允许TIME_WAIT套接字数量的最大值, 如果超过这个数字,TIME_WAIT套接字将立刻被清除并打印警告信息。
    该参数默认为 180000,过多的TIME_WAIT套接字会使Web服务器变慢。
    
    node2:/root/test#sysctl -w net.ipv4.tcp_max_tw_buckets=10
    net.ipv4.tcp_max_tw_buckets = 10
    
    node2:/root#netstat -na | grep 8080 
    tcp        0      0 192.168.137.3:46705         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46696         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46702         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46698         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46697         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46699         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46701         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46700         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46703         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46704         192.168.137.2:8080          TIME_WAIT   
    node2:/root#netstat -na | grep 8080 
    tcp        0      0 192.168.137.3:46705         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46696         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46702         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46698         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46697         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46699         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46701         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46700         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46703         192.168.137.2:8080          TIME_WAIT   
    tcp        0      0 192.168.137.3:46704         192.168.137.2:8080          TIME_WAIT   
    node2:/root#netstat -na | grep 8080 | wc -l
    10
    
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
    TCP: time wait bucket table overflow
  • 相关阅读:
    72. Edit Distance
    电脑常识
    java try·····catch·····异常处理学习
    java链接sqlserver数据库
    HTTP Status 500
    初识NDA
    Sublime Text_v2.02包含中文包以及使用方法
    ol 与ul 的区别
    word-break: break-all word-break:keep-all word-wrap: break-word三者的区别
    用deamon打开ISO文件,提示命令行错误!!
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13348318.html
Copyright © 2020-2023  润新知