From owner-freebsd-net@FreeBSD.ORG Fri Aug 12 23:36:48 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86ABE106566B for ; Fri, 12 Aug 2011 23:36:48 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4A9768FC14 for ; Fri, 12 Aug 2011 23:36:48 +0000 (UTC) Received: by gwb15 with SMTP id 15so1325605gwb.13 for ; Fri, 12 Aug 2011 16:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=NX9sgeLK7h1ZTWDYzX7nuUweQaFW30Las9ZihgGyOqM=; b=DqTKKXuY5uz52XJB2KDpTF7Vdryn0XKzllF3lus8xVp/xneuI9GBPlZQO94Rp9RCUh 0mG2EQqIoYtOh3wBSRVu+v2B+vB7V+atH2L+J4rf7qI/ImQBV7y+w4kD/VUO+iLTOkfF pi4P4jQgZT0AbTpgVM4XjeqKnRHZdFxdRoCxM= MIME-Version: 1.0 Received: by 10.151.48.1 with SMTP id a1mr580362ybk.411.1313192207479; Fri, 12 Aug 2011 16:36:47 -0700 (PDT) Received: by 10.150.97.3 with HTTP; Fri, 12 Aug 2011 16:36:47 -0700 (PDT) In-Reply-To: <20110812214309.GI72508@2bithacker.net> References: <20110812214309.GI72508@2bithacker.net> Date: Fri, 12 Aug 2011 16:36:47 -0700 Message-ID: From: Kevin Oberman To: chip@2bithacker.net, freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: Odd TCP RFC1323 Behavior X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 12 Aug 2011 23:36:48 -0000 On Fri, Aug 12, 2011 at 2:43 PM, Chip Marshall wrote: > I've been digging into an issue with SSH throughput and > discovered that one of the servers involved isn't using RFC1323 > window scaling and timestamps. > > The server is running 7.3-RELEASE-p3, and has > net.inet.tcp.rfc1323 set to 1. > > When connecting out from the server, it sets both Window Scale > and TimeStamp options in the SYN packet and everything is fine. > > When a connection comes into the server with WS and TS set in > the SYN, the response varies. For port 53 (named) the SYN/ACK > has WS/TS options. For port 22 (sshd) the SYN/ACK does not have > WS/TS options, unless the connection is via lo0. > > ssh is OpenSSH_5.2p1, compiled from ports with default options. > > I'm really at a loss to explain this. > > Why does named use RFC1323 on bce0 when sshd doesn't? > Why does sshd use RFC1323 on lo0 but not on bce0? > > I can provide PCAPs of the SYN, SYN/ACK exchanges if that > will help. Try installing security/openssh-portable from ports and enable the HPN patches. As it stands today, openssh locks the window size to a tiny value. This causes performance over wide area links to be simply terrible. Take a look at http://fasterdata.es.net/fasterdata/say-no-to-scp/ for more information on the issue. As you will see there, window scaling is the least of the performance issues with openssh. -- R. Kevin Oberman, Network Engineer - Retired E-mail: kob6558@gmail.com