Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jun 1999 08:12:52 +1000
From:      Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
To:        current@FreeBSD.ORG
Subject:   Re: net.inet.tcp.always_keepalive on as default ?
Message-ID:  <99Jun2.075705est.40399@border.alcanet.com.au>
In-Reply-To: <20883.928262460@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp <phk@freebsd.org> wrote:
>Considering the number of hosts on the net today, which come and
>go with no warning and with dynamic IP assignments, I would propose
>that we disregard what the "old farts" felt about TCP keepalives,
>and enable the sysctl net.inet.tcp.always_keepalive as default.

I think this sounds reasonable, but in this case, all the relevant
knobs need to be documented.  There's currently no documententation
strings for any of net.inet.tcp.keepidle, net.inet.tcp.keepintvl or
net.inet.tcp.keepinit.  It's also not immediately obvious that
these counters are all in 500msec intervals

I believe we should also add sysctl knobs for tcp_keepcnt and
tcp_maxpersistidle (the latter because it shares the same default
value - TCPTV_KEEP_IDLE - with tcp_keepidle).

And, whilst studying the code, I notice that the comments in
netinet/tcp_timer.h state:

 * an ack segment in response from the peer.  If, despite the TCPT_KEEP
 * initiated segments we cannot elicit a response from a peer in TCPT_MAXIDLE
 * amount of time probing, then we drop the connection.

But there's no variable or macro `TCPT_MAXIDLE'.  The connection is
dropped after tcp_maxidle = tcp_keepcnt [fixed at TCPTV_KEEPCNT=8] *
tcp_keepintvl [initially TCPTV_KEEPINTVL=75s, adjust via
net.inet.tcp.keepintvl].  Does one of the committers feel like fixing
this, or should I just send-pr it?

Matthew Hunt <mph@astro.caltech.edu> wrote:
>I'm thinking of long-lived connections like telnet and ssh; if you're
>doing work over such a connection, it would be nice if the connection
>endured an outage while you're away sleeping, like it does without
>keepalives.

I'm not sure this point is valid.  An increasing percentage of such
connections will be using dynamic IP addresses - so you can't be sure
that you'll get the same address back.  And this presupposes that
neither system tries to send anything across the link whilst it's
dead.

Nate Williams <nate@mt.sri.com> wrote:
>Off == 1 week KEEPALIVE
>ON  == traditiona 1 hour KEEPALIVe.
                   ^^^^^^ 2 hours actually.

I think that definitely violates POLA.  If I have keepalives off (for
whatever reason), I expect there to be _no_ keepalives - not just less
frequent keepalives.  We'd need to make net.inet.tcp.always_keepalive a
3-way switch: on, off and 'i_dont_want_any_!@%$!#@_keepalives' :-)

Poul-Henning Kamp <phk@critter.freebsd.dk> wrote:
>My intent was an "implementation" which would set:
>
>	net.inet.tcp.keepidle: 86400
12-hour keepalives.  That's different to previous suggestions :-).

>	net.inet.tcp.keepintvl: 64800
I don't see any real need to extend the default keepintvl.  I suspect
a slow burst (currently every 75 secs) is probably better than this
chinese water-torture approach.

Peter


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Jun2.075705est.40399>