Answers:
不,你不能;它被硬编码在内核中。因此,更改内核并重新编译。
#define TCP_TIMEOUT_INIT ((unsigned)(3*HZ)) /* RFC 1122 initial RTO value */
这就是您应该包含在include / net / tcp.h中的内容。
但是我可以看到有人提供了补丁,即使我自己从未尝试过
初始设置不会对您的整体性能产生太大影响,因为RTO会根据网络条件进行自我调整。如果您确实更改了RTO,则可以将其设置为1秒(但不能更低)。
RFC 1122中对此进行了讨论:
The following values SHOULD be used to initialize the estimation parameters for a new connection:
(a) RTT = 0 seconds.
(b) RTO = 3 seconds. (The smoothed variance is to be
initialized to the value that will result in this RTO).
The recommended upper and lower bounds on the RTO are known
to be inadequate on large internets. The lower bound SHOULD
be measured in fractions of a second (to accommodate high
speed LANs) and the upper bound should be 2*MSL, i.e., 240
seconds.
DISCUSSION:
Experience has shown that these initialization values
are reasonable, and that in any case the Karn and
Jacobson algorithms make TCP behavior reasonably
insensitive to the initial parameter choices.
RFC 6298是一项提议的更新(于2011年6月发布),其中说RTO可以初始化为一个较低的值(但不小于1秒),并且包含一个附录,该附录包含证明1秒作为合理初始值的数据。