From owner-freebsd-net@FreeBSD.ORG Sat Aug 9 18:42:40 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67F38FB8 for ; Sat, 9 Aug 2014 18:42:40 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AC822A4C for ; Sat, 9 Aug 2014 18:42:39 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s79IgWnZ098900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Aug 2014 11:42:33 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s79IgWd0098899; Sat, 9 Aug 2014 11:42:32 -0700 (PDT) (envelope-from jmg) Date: Sat, 9 Aug 2014 11:42:32 -0700 From: John-Mark Gurney To: Niu Zhixiong Subject: Re: A problem on TCP in High RTT Environment. Message-ID: <20140809184232.GF83475@funkthat.com> Mail-Followup-To: Niu Zhixiong , freebsd-net@freebsd.org, Bill Yuan References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Sat, 09 Aug 2014 11:42:33 -0700 (PDT) Cc: freebsd-net@freebsd.org, Bill Yuan X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Aug 2014 18:42:40 -0000 Niu Zhixiong wrote this message on Fri, Aug 08, 2014 at 20:34 +0800: > Dear all, > > Last month, I send problems related to FTP/TCP in a high RTT environment. > After that, I setup a simulation environment(Dummynet) to test TCP and SCTP > in high delay environment. After finishing the test, I can see TCP is > always slower than SCTP. But, I think it is not possible. (Plz see the > figure in the attachment). When the delay is 200ms(means RTT=400ms). > Besides, the TCP is extremely slow. > > ALL BW=20Mbps, DELAY= 0 ~ 200MS, Packet LOSS = 0 (by dummynet) > > This is my parameters: > FreeBSD vfreetest0 10.0-RELEASE FreeBSD 10.0-RELEASE #0: Thu Aug 7 > 11:04:15 HKT 2014 > > sysctl net.inet.tcp [...] > net.inet.tcp.recvbuf_auto: 0 [...] > net.inet.tcp.sendbuf_auto: 0 Try enabling this... This should allow the buffer to grow large enough to deal w/ the higher latency... Also, make sure your program isn't setting the recv buffer size as that will disable the auto growing... If you use netstat -a, you should be able to see the send-q on the sender grow as necessary... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."