Jorgen Grahn <grahn+(E-Mail Removed)> wrote:
> On Wed, 2011-02-23, Rick Jones wrote:
> > If the client is actively retransmitting, it isn't "idle" and so I
> > would not expect TCP keepalives to be sent. Further, if the client is
> > indeed actively retransmitting (ie has unacked data) then I would
> > expect the TCP connection to time out well before the default
> > keepalive setting.
> But how long is that timeout, typically?
About as long as the typical piece of string

My guess is it depends
on:
net.ipv4.tcp_retries2 = 15
and the RTT between the two systems, seasoned slightly with the
minimum RTO. If the minimum RTO is say 0.5 seconds, and there will be
15 retries, with a doubling each time that could become quite long. i
forget if there is an RTO cap in the linux stack
> Way too long for the original poster, right?
If so, the thing to do there is have application level responses and
run a timer up in the application layer.
> To the original poster: it's easy to experiment with this, using e.g.
> netcat:
> % nc -l 6969
> ...
> and in another terminal:
> % od huge_file | strace nc localhost 6969
> Then quickly SIGSTOP (^Z) the first nc, set up tcpdump to monitor
> tcp port 6969, and go do something else. Mine has been sitting over
> 20 minutes by now, trying to retransmit every 2 minutes.
If you simply SIGSTOP the receiver, all that will do is cause the
receive window to fill and then you are talking about persist not
retransmission. You need to preclude TCP segments reaching the
receiver, or the receiver's ACKs reaching the sender.
rick jones
--
I don't interest myself in "why." I think more often in terms of
"when," sometimes "where;" always "how much." - Joubert
these opinions are mine, all mine; HP might not want them anyway...

feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...