tcp_tw_recycle有多快? [英] How fast does tcp_tw_recycle mean?

查看:92
本文介绍了tcp_tw_recycle有多快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用TCP短连接连接到服务器.当Web视图过高时,许多TIME_WAIT tcp连接会导致系统无法建立新连接.

我在Web上搜索了一些信息,发现很多人建议将tcp_tw_recycle设置为1.

Linux官方文档对此选项进行了如下解释:
tcp_tw_recycle-BOOLEAN
启用快速回收TIME-WAIT套接字.默认值为0.
未经技术咨询/要求不得更改
专家.

该解释不是特定的.我有以下两个问题:
1)多快? 1分1秒或其他时间?
2)警告没有建议/没有技术要求的情况下不得更改它
"的警告是什么? 专家."暗含吗?

We use the TCP short connection to connect to server. When the web view is too high, many TIME_WAIT tcp connections cause system can not establish new connection.

I searched some information in Web, and I found many people recommended to set tcp_tw_recycle to 1.

The Linux official document explains this option as follows:
tcp_tw_recycle - BOOLEAN
Enable fast recycling TIME-WAIT sockets. Default value is 0.
It should not be changed without advice/request of technical
experts.

This explanation is not specific. I have the following two questions:
1) How fast? 1 min, 1 sec or others?
2) what does the warning "It should not be changed without advice/request of technical
experts." imply ?

推荐答案

似乎很少有文档或用户对此值的了解,但最重要的是:
There seems very little documentation or user experiences of this value but the bottom line seems to be:

  1. 不知道;查看Linux源代码.
  2. 不要这样做.


禁止使用的警告提示它可能还有其他副作用,但似乎没人知道它们可能是什么.


The warning against use suggests that it may have other side effects but no one seems to know what they may be.


尝试tcp_tw_reuse=1代替,通常认为它更安全.请参见此处 [
Try tcp_tw_reuse=1 instead, it''s generally considered safer. See here[^] for more details.


这篇关于tcp_tw_recycle有多快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆