[Bloat] SO_SNDBUF and SO_RCVBUF
Hal Murray
hmurray at megapathdsl.net
Wed Apr 22 15:10:56 EDT 2015
> 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.
More information about the Bloat
mailing list