Can net.inet.tcp.msl be set per interface?

Tom Worster fsb at thefsb.org
Sat May 28 13:29:10 UTC 2011


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" <kmacy at freebsd.org> 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 <fsb at 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 at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-net
>> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>>




More information about the freebsd-net mailing list