From owner-freebsd-net@FreeBSD.ORG Sat May 28 13:29:09 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0D35106566B for ; Sat, 28 May 2011 13:29:09 +0000 (UTC) (envelope-from fsb@thefsb.org) Received: from smtp191.iad.emailsrvr.com (smtp191.iad.emailsrvr.com [207.97.245.191]) by mx1.freebsd.org (Postfix) with ESMTP id B62DF8FC14 for ; Sat, 28 May 2011 13:29:09 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp29.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id F00DC14825C; Sat, 28 May 2011 09:29:08 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp29.relay.iad1a.emailsrvr.com (Authenticated sender: fsb-AT-thefsb.org) with ESMTPSA id 4C15B14822C; Sat, 28 May 2011 09:29:07 -0400 (EDT) User-Agent: Microsoft-MacOutlook/14.10.0.110310 Date: Sat, 28 May 2011 09:29:03 -0400 From: Tom Worster To: "K. Macy" Message-ID: Thread-Topic: Can net.inet.tcp.msl be set per interface? In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Can net.inet.tcp.msl be set per interface? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 13:29:10 -0000 Thanks, Kip, good to know. I partly understand what you said, especially the last sentence, which I rather like. As a next step I should ask the TCP cognoscenti if this kind of tuning is as wise as I imagine. Tom On 5/28/11 9:09 AM, "K. Macy" wrote: >Unfortunately msl is a global variable: > >tcp_timer.c: > >int tcp_msl; >SYSCTL_PROC(_net_inet_tcp, OID_AUTO, msl, CTLTYPE_INT|CTLFLAG_RW, > &tcp_msl, 0, sysctl_msec_to_ticks, "I", "Maximum segment lifetime"); > > >Sockets or rather inpcbs in timewait are maintained on a per-vnet >list. Since tcp_twstart is called from tcp_do_segment in tcp_input.c >it does actually have access to the mbuf triggering the state >transition and thus the receiving interface. As far as I can tell, >changing the behavior to what you're asking for would not be >difficult. > > >Cheers, >Kip > >On Fri, May 27, 2011 at 4:59 PM, Tom Worster wrote: >> [[I asked this yesterday on -questions, probably the wrong list]] >> >> If a server has one interface to the Internet and another interface to a >> switch connecting to a few other servers, it seems TCP's MSL value might >> reasonably be set a lot lower on the private interface. >> >> I'm specifically thinking of a lot of short MySQL connections(*) between >> the >> servers on the private LAN. The average number of MySQL client >>connections >> in TIME_WAIT will be proportional to MSL. And, while the circumstances >> under which a long MSL would help anything are unimaginable on the LAN, >> they are not on the Internet. >> >> So can net.inet.tcp.msl be set per interface? >> >> (*) Or similar: Sphinx, memcached, perhaps. >> >> Tom >> >> >> >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >>