From owner-freebsd-net@freebsd.org Fri Aug 28 19:14:27 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98C019C47C9 for ; Fri, 28 Aug 2015 19:14:27 +0000 (UTC) (envelope-from chris@stankevitz.com) Received: from mango.stankevitz.com (mango.stankevitz.com [208.79.93.194]) by mx1.freebsd.org (Postfix) with ESMTP id 85FB610EB for ; Fri, 28 Aug 2015 19:14:27 +0000 (UTC) (envelope-from chris@stankevitz.com) Received: from Chriss-MacBook-Pro.local (209-203-101-124.static.twtelecom.net [209.203.101.124]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mango.stankevitz.com (Postfix) with ESMTPSA id 5040B1677 for ; Fri, 28 Aug 2015 12:14:26 -0700 (PDT) Message-ID: <55E0B311.9070501@stankevitz.com> Date: Fri, 28 Aug 2015 12:14:25 -0700 From: Chris Stankevitz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: Re: ssh over WAN: TCP window too small References: <55DCF080.7080208@stankevitz.com> In-Reply-To: <55DCF080.7080208@stankevitz.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2015 19:14:27 -0000 On 8/25/15 3:47 PM, Chris Stankevitz wrote: > Can anyone explain my abysmally small TCP window? So I believe this is the story: 1. openssh limits the size of some outgoing buffer to 65KB 2. openssh/HPN tries to improve on this by increasing the size of the outgoing buffer to match getsockopt(SO_SNDBUF) 3. When asked for the current SO_SNDBUF, FreeBSD 10.1 reports the high watermark of the outgoing buffer, not its capacity. 4. (2) is essentially a no-op because of (3). 5. openssh/HPN can be tricked into increasing its outgoing buffer by increasing sendspace/recvspace My comments: - (3) is not what I would expect -- perhaps the ssh/HPN folks would agree with me. Shouldn't getsockopt(SO_SNDBUF) return the same value set by setsockopt(SO_SNDBUF)? - I do not understand the mechanism by which (5) works. Chris