From owner-freebsd-current Tue Jun 1 15:13:14 1999 Delivered-To: freebsd-current@freebsd.org Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 67B7615822 for ; Tue, 1 Jun 1999 15:13:05 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <40399>; Wed, 2 Jun 1999 07:57:05 +1000 Date: Wed, 2 Jun 1999 08:12:52 +1000 From: Peter Jeremy Subject: Re: net.inet.tcp.always_keepalive on as default ? In-reply-to: <20883.928262460@critter.freebsd.dk> To: current@FreeBSD.ORG Message-Id: <99Jun2.075705est.40399@border.alcanet.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Poul-Henning Kamp 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 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 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 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