linux设置重传时间,关于Linux下设置TCP的重传时间问题

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);

: ...................

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值