From owner-freebsd-net@FreeBSD.ORG Mon Jul 21 03:27:38 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17D05EDC for ; Mon, 21 Jul 2014 03:27:38 +0000 (UTC) Received: from mail-qg0-x22f.google.com (mail-qg0-x22f.google.com [IPv6:2607:f8b0:400d:c04::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA7342CB0 for ; Mon, 21 Jul 2014 03:27:37 +0000 (UTC) Received: by mail-qg0-f47.google.com with SMTP id i50so4972631qgf.34 for ; Sun, 20 Jul 2014 20:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UsgFZLwzES2A+RQgDzxtj/Wi06r+mc36EZV6sNVO2M8=; b=dnDiipOrpnkG3F/2gwB0YYxWXWdq3NWJkp+vkqgL7556xu97wdCPWVUbd+SnythQPh QCUgbtGTgX43gC5a7aNMa1kBMIKJ5xe9ZdwKzQnEg1XzkiLLTYzi+gpjcInc9QpBfKmS A3vxNPmpEuN8ZXYT3UxKF6vY0a93TT5MCbOjdd6qDg9UREfsmWVkGEjlGd5o/Be9VFia N4mtyo/gCp+/f3ShI/eNJxpACRbhbkfKsIMRPolhUEN3vJ115oyVRT2jJo4rfylUs6QC qBhsaMnx3FK2ftzmrrbx6rmGliyrRB5i4cSat2FX3pT/vAgSCbhg5qQXHSTYqxLx4o6h ESkw== MIME-Version: 1.0 X-Received: by 10.224.160.134 with SMTP id n6mr18370993qax.84.1405913256775; Sun, 20 Jul 2014 20:27:36 -0700 (PDT) Received: by 10.224.8.136 with HTTP; Sun, 20 Jul 2014 20:27:36 -0700 (PDT) In-Reply-To: <00d201cfa436$d2936ce0$77ba46a0$@gmail.com> References: <00d201cfa436$d2936ce0$77ba46a0$@gmail.com> Date: Mon, 21 Jul 2014 11:27:36 +0800 Message-ID: Subject: Re: A TCP problem on High Delay From: Niu Zhixiong To: bycn82 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: freebsd-net@freebsd.org 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: Mon, 21 Jul 2014 03:27:38 -0000 Hi, Thank you so much. I am wondering that why FreeBSD default is less than Linux default in high delay * BW. Why, Why and Why. @FreeBSD_KVM:~ % sysctl net.inet.tcp net.inet.tcp.rfc1323: 1 net.inet.tcp.mssdflt: 536 net.inet.tcp.keepidle: 7200000 net.inet.tcp.keepintvl: 75000 net.inet.tcp.sendspace: 32768 net.inet.tcp.recvspace: 65536 net.inet.tcp.keepinit: 75000 net.inet.tcp.delacktime: 100 net.inet.tcp.v6mssdflt: 1220 net.inet.tcp.cc.algorithm: newreno net.inet.tcp.cc.available: newreno net.inet.tcp.hostcache.cachelimit: 15360 net.inet.tcp.hostcache.hashsize: 512 net.inet.tcp.hostcache.bucketlimit: 30 net.inet.tcp.hostcache.count: 0 net.inet.tcp.hostcache.expire: 1 net.inet.tcp.hostcache.prune: 300 net.inet.tcp.hostcache.purge: 0 net.inet.tcp.log_in_vain: 0 net.inet.tcp.blackhole: 0 net.inet.tcp.delayed_ack: 1 net.inet.tcp.drop_synfin: 0 net.inet.tcp.rfc3042: 1 net.inet.tcp.rfc3390: 1 net.inet.tcp.experimental.initcwnd10: 1 net.inet.tcp.rfc3465: 1 net.inet.tcp.abc_l_var: 2 net.inet.tcp.ecn.enable: 0 net.inet.tcp.ecn.maxretries: 1 net.inet.tcp.insecure_rst: 0 net.inet.tcp.recvbuf_auto: 1 net.inet.tcp.recvbuf_inc: 524288 net.inet.tcp.recvbuf_max: 16777216 net.inet.tcp.path_mtu_discovery: 1 net.inet.tcp.tso: 1 net.inet.tcp.sendbuf_auto: 1 net.inet.tcp.sendbuf_inc: 16384 net.inet.tcp.sendbuf_max: 16777216 net.inet.tcp.reass.maxsegments: 7900 net.inet.tcp.reass.cursegments: 0 net.inet.tcp.reass.overflows: 0 net.inet.tcp.sack.enable: 1 net.inet.tcp.sack.maxholes: 128 net.inet.tcp.sack.globalmaxholes: 65536 net.inet.tcp.sack.globalholes: 0 net.inet.tcp.minmss: 216 net.inet.tcp.log_debug: 0 net.inet.tcp.tcbhashsize: 16384 net.inet.tcp.do_tcpdrain: 1 net.inet.tcp.pcbcount: 4 net.inet.tcp.icmp_may_rst: 1 net.inet.tcp.isn_reseed_interval: 0 net.inet.tcp.soreceive_stream: 0 net.inet.tcp.syncookies: 1 net.inet.tcp.syncookies_only: 0 net.inet.tcp.syncache.bucketlimit: 30 net.inet.tcp.syncache.cachelimit: 15375 net.inet.tcp.syncache.count: 0 net.inet.tcp.syncache.hashsize: 512 net.inet.tcp.syncache.rexmtlimit: 3 net.inet.tcp.syncache.rst_on_sock_fail: 1 net.inet.tcp.msl: 30000 net.inet.tcp.rexmit_min: 30 net.inet.tcp.rexmit_slop: 200 net.inet.tcp.always_keepalive: 1 net.inet.tcp.fast_finwait2_recycle: 0 net.inet.tcp.finwait2_timeout: 60000 net.inet.tcp.keepcnt: 8 net.inet.tcp.rexmit_drop_options: 0 net.inet.tcp.per_cpu_timers: 0 net.inet.tcp.timer_race: 0 net.inet.tcp.maxtcptw: 12963 net.inet.tcp.nolocaltimewait: 0 Regards, Niu Zhixiong =EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF= =BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D=EF=BC=8D kaiaixi@gmail.com On Mon, Jul 21, 2014 at 12:22 AM, bycn82 wrote: > Hi, > Yes, according to your pcap files,it is because of the window size. > more information here http://www.ietf.org/rfc/rfc1323.txt > and share the result of "sysctl net.inet.tcp" > > Regards, > bycn82 > > > > > -----Original Message----- > > From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd- > > net@freebsd.org] On Behalf Of Niu Zhixiong > > Sent: 20 July, 2014 23:43 > > To: freebsd-net@freebsd.org > > Subject: A TCP problem on High Delay > > > > Dear All, > > I set up an FTP server in a high delay but fairly BW environment. > > When I try to download files from this FreeBSD FTP server, A FreeBS= D > > client is always slower than Linux Client. (Linux Client is about 1MB/s= , > > But FreeBSD client 300KB/s). I am sure that the two clients are in same > > networks and no firewalls are between server and clients. Then I try to > > use SCTP protocol rather than TCP protocol. The FreeBSD client is faste= r > > than itself in TCP. > > > > I try to increase the rbuff of the client. But, It always less than the > > linux one. I think the problem may be the smaller window of Freebsd tha= n > > Linux. But, I changed some parameters. But, nothing changed. > > > > uname -a > > 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC > > 2014 > > root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 > > > > According to > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning- > > kernel-limits.html > > > > I try to enable sysctl net.inet.tcp.inflight.enable or sysctl > > net.inet.tcp.inflight_enable , but there is no such option in FreeBSD 1= 0. > > > > Then I follow this https://fasterdata.es.net/host-tuning/freebsd/ > > And make a large rbuffer. > > > > > > sysctl kern.ipc.maxsockbuf=3D16777216 > > sysctl net.inet.tcp.sendbuf_max=3D16777216 > > sysctl net.inet.tcp.recvbuf_max=3D16777216 > > sysctl net.inet.tcp.sendbuf_auto=3D1 > > sysctl net.inet.tcp.recvbuf_auto=3D1 > > sysctl net.inet.tcp.sendbuf_inc=3D16384 > > sysctl net.inet.tcp.recvbuf_inc=3D524288 > > sysctl net.inet.tcp.hostcache.expire=3D1 > > > > But, Nothing is happened. > > > > In the attachments, l_f is the linux packet capture and f_f is the > > freebsd packet capture. > > > > > > > > > > =E2=80=8B > > packet_capture.7z > > > ive_web> > > =E2=80=8B > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > >