Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 May 2011 15:09:59 +0200
From:      "K. Macy" <kmacy@freebsd.org>
To:        Tom Worster <fsb@thefsb.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Can net.inet.tcp.msl be set per interface?
Message-ID:  <BANLkTin9gMJJFq=XxiGK0_R9UA7XdYH%2Bug@mail.gmail.com>
In-Reply-To: <CA0534AF.15912%fsb@thefsb.org>
References:  <CA0534AF.15912%fsb@thefsb.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <fsb@thefsb.org> 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"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTin9gMJJFq=XxiGK0_R9UA7XdYH%2Bug>