[Bloat] SO_SNDBUF and SO_RCVBUF

Dave Taht dave.taht at gmail.com
Wed Apr 22 12:28:50 PDT 2015


SO_SNDLOWAT or something similar to it with a name I cannot recall,
can be useful.

On Wed, Apr 22, 2015 at 12:10 PM, Hal Murray <hmurray at megapathdsl.net> wrote:
>
>> As I understand it (I thought) SO_SNDBUF and SO_RCVBUF are socket buffers
>> for the application layer, they do not change the TCP window size either
>> send or receive. Which is perhaps why they aren't used much. They don't do
>> much good in iperf that's for sure! Might be wrong, but I agree with the
>> premise - auto-tuning should work.
>
> I sure expect them to do the obvious thing.
>
> man 7 socket says:
>
>        SO_SNDBUF
>               Sets  or gets the maximum socket send buffer in bytes.
>
> It doesn't actually say that turns into the TCP window size.
>
> On Linux, there is a factor of 2 for overhead and whatever.
>
> man tcp says:
>       TCP uses the extra space for administrative purposes and inter-
>        nal kernel structures, and the /proc file  values  reflect  the  larger
>        sizes  compared  to the actual TCP windows.
>
> So it looks like the number you feed it turns into the window size.
>
> A few quick tests with netperf confirm that it is doing something close to
> what I expect but I haven't fired up tcpdump to verify that the window size
> is what I asked for.  netperf does print out values that are 2x what I asked
> for.
>
> Yuck.  (That's Yuck at Linux, not netperf.)
>
>
> --
> These are my opinions.  I hate spam.
>
>
>
> _______________________________________________
> Bloat mailing list
> Bloat at lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/bloat



-- 
Dave Täht
Open Networking needs **Open Source Hardware**

https://plus.google.com/u/0/+EricRaymond/posts/JqxCe2pFr67


More information about the Bloat mailing list