From owner-freebsd-net@freebsd.org Tue Aug 25 23:11:38 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 A21479C226F for ; Tue, 25 Aug 2015 23:11:38 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 59EFFBA for ; Tue, 25 Aug 2015 23:11:37 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 9B44925D3A9A; Tue, 25 Aug 2015 23:11:28 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id DDD50C7705E; Tue, 25 Aug 2015 23:11:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id ZrnzE8KfvnFM; Tue, 25 Aug 2015 23:11:26 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:9194:cf5a:e0dc:a813] (unknown [IPv6:fde9:577b:c1a9:4410:9194:cf5a:e0dc:a813]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 46FD5C76FD9; Tue, 25 Aug 2015 23:11:25 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: ssh over WAN: TCP window too small From: "Bjoern A. Zeeb" In-Reply-To: <55DCF080.7080208@stankevitz.com> Date: Tue, 25 Aug 2015 23:11:06 +0000 Cc: freebsd-net@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <27420EDC-5816-4B9E-A834-E4A035B8411C@lists.zabbadoz.net> References: <55DCF080.7080208@stankevitz.com> To: Chris Stankevitz X-Mailer: Apple Mail (2.2104) 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: Tue, 25 Aug 2015 23:11:38 -0000 > On 25 Aug 2015, at 22:47 , Chris Stankevitz = wrote: >=20 > Hi, >=20 > # cat /dev/urandom | ssh root@host 'cat > /dev/null' >=20 > I use the above ssh command over a high-BDP WAN link (80 ms @ 100 = Mbps). tcpdump shows I am TCP window limited to 64 KBytes (yielding 5 = Mbps). iperf with default options gets the window opened to 500 KBytes = (yielding 35 Mbps). >=20 > Both sides of the connection: FreeBSD 10.1 w/default sshd options = (except I permit root login). In particular, HPN is not disabled. >=20 > Can anyone explain my abysmally small TCP window? >=20 > Can anyone recommend some tools/tricks to figure out what in FreeBSD = and/or base SSH is limiting the send/recv buffer and/or TCP window? if you have the memory, try these sysctls: kern.ipc.maxsockbuf=3D146800640 net.inet.tcp.recvbuf_max=3D67108864 net.inet.tcp.sendbuf_max=3D67108864=