tcp_keepalive_intvl (integer; default: 75; since Linux 2.4)
The number of seconds between TCP keep-alive probes.
tcp_keepalive_probes (integer; default: 9; since Linux 2.2)
The maximum number of TCP keep-alive probes to send before giv‐ing up and killing the connection if no response is obtained from the other end.
tcp_keepalive_time (integer; default: 7200; since Linux 2.2)
The number of seconds a connection needs to be idle before TCP begins sending out keep-alive probes. Keep-alives are only sent when the SO_KEEPALIVE socket option is enabled. The default value is 7200 seconds (2 hours). An idle connection is termi‐nated after approximately an additional 11 minutes (9 probes an interval of 75 seconds apart) when keep-alive is enabled.
Note that underlying connection tracking mechanisms and applica‐tion timeouts may be much shorter.
tcp_retries2 (integer; default: 15; since Linux 2.2)
The maximum number of times a TCP packet is retransmitted in established state before giving up. The default value is 15,which corresponds to a duration of approximately between 13 to 30 minutes, depending on the retransmission timeout. The RFC 1122 specified minimum limit of 100 seconds is typically deemed too short.
【 在 lastorder (这也可以?) 的大作中提到: 】
: tcp_retries2这个是设置保活包重传的吧?我碰到的问题并没有涉及掉线,事实上一直没有掉线。我观测到的现象是有两个包连续丢包重传,而且第二个包重传的时候间隔特别长(2分钟)。这样导致一段时间内客户端没有任何消息包收到。
: 不过我有两个疑问:
: 1. 为什么服务器一次只发送两个包,就不继续发送了呢?我记得滑动窗口的机制是发送一批报文出去,等待连续的反馈。当然这俩包稍微有点大(每个大概1.3k);
: ...................