On 2015-03-29 16:59, Stuart Henderson wrote:
On 2015/03/29 14:45, Tinker wrote:
On 2015-03-29 13:50, Stuart Henderson wrote:
>On 2015-03-29, Tinker <ti...@openmailbox.org> wrote:
>>How do I make TCP stack's initial window 10-50KB, so that I can burst
>>that amount of data without any interference from the TCP slow-start/RFC
>>3390 anti-congestion whatsoever?
>
>OpenBSD already starts with 14600, see around line 3140 in tcp_input.c
>if you'd like to experiment.
Stuart,
Thank you a lot for your response.
Wait, what line exactly at
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/netinet/tcp_input.c?annotate=1.287
is it that sets the initial window size?
(3145 and 3148 seem to refer to that it's already set.. and 3130-3142
too?)
And, could I conveniently set this to 50KB via some sysctl setting?
(It seems to me that the mssdflt is used as step size when the
anticongestion increases and decreases the window size, so I guess
just
increasing it by a multiple of 10 would be a very bad idea.)
Thanks!
Tinker
By default tcp_do_rfc3390=2, so the usual case is this:
1.252 claudio 3143: } else if (tcp_do_rfc3390 == 2) {
3144: /* increase initial window */
3145: tp->snd_cwnd = ulmin(10 * mss,
ulmax(2 * mss, 14600));
There is no existing sysctl to allow fine tuning, just the "IW4, max
4380"
and "IW10, max 14600" switch of net.inet.tcp.rfc3390. But you could
easily
locally extend that variable if you want to experiment with changing
the
multiplier and max value (or something else).
Aha, thanks for clarifying and for clarifying my reading mistake!
If I set both MTU and mssdflt to 15000, would that mean that row 3145
would execute as
tp->snd_cwnd = ulmin(10 * 15000, > ulmax(2 * 15000, 14600));
so that is that the initial congestion window would be 150 KB?
How to get "mss" set to 15000:
ifconfig reports that my NIC has an MTU of 1500 and "ifconfig nic
hwfeatures" tells that the hardmtu i.e. max configurable mtu size, is
16000.
The sourcecode says that for IPv4, if "automtu" is set, then it will use
the MTU as mss variable.
I have no idea of if "automtu" is set, however, if I just both set the
NIC's MTU *and* the mssdflt sysctl setting, then that way the mss value
should guaranteedly be set to that, to the best of my understanding.
Thanks!
Tinker