我在Linux上运行彗星服务器(Debian)。
所有连接都由nginx代理。
而我的time_wait /build立的速度太大(50k / 15k),虽然我设置了reuse_connections。
我想在time_wait状态下减less这些大量不需要的连接。
这是我的sysctl.conf规则:
net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_keepalive_time = 60 net.ipv4.tcp_fin_timeout = 3 net.ipv4.tcp_max_tw_buckets = 360000 net.ipv4.tcp_keepalive_probes=3
你能告诉我一些关于如何减lesstime_waits的线索吗?
net.ipv4.tcp_max_tw_buckets = 360000
为什么在TIME_WAIT中有50K的套接字是一个问题,当你允许它们的360K呢?