From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ip-64-139-1-69.sjc.megapath.net (ip-64-139-1-69.sjc.megapath.net [64.139.1.69]) by huchra.bufferbloat.net (Postfix) with ESMTP id 4A2C821F32E for ; Wed, 22 Apr 2015 12:10:58 -0700 (PDT) Received: from shuksan (localhost [127.0.0.1]) by ip-64-139-1-69.sjc.megapath.net (Postfix) with ESMTP id 9C7AC406057; Wed, 22 Apr 2015 12:10:56 -0700 (PDT) X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3 To: bloat@lists.bufferbloat.net From: Hal Murray Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 22 Apr 2015 12:10:56 -0700 Message-Id: <20150422191056.9C7AC406057@ip-64-139-1-69.sjc.megapath.net> Cc: Hal Murray Subject: [Bloat] SO_SNDBUF and SO_RCVBUF X-BeenThere: bloat@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: General list for discussing Bufferbloat List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 19:11:27 -0000 > 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.