From owner-freebsd-net@FreeBSD.ORG Sun Jul 20 15:42:37 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 6F90D750 for ; Sun, 20 Jul 2014 15:42:37 +0000 (UTC) Received: from mail-qg0-x235.google.com (mail-qg0-x235.google.com [IPv6:2607:f8b0:400d:c04::235]) (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 3366A2F7A for ; Sun, 20 Jul 2014 15:42:37 +0000 (UTC) Received: by mail-qg0-f53.google.com with SMTP id q107so4695648qgd.12 for ; Sun, 20 Jul 2014 08:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=1JgcnOUtKggEdXHYPZIkc7G7gtlK3I+laZiD5/qdjQc=; b=JSmPvuRKUlVoadl9cz0rawAMm9/DskhzZhVhedWkaRLQEn0ug3QkfrHIrhkn61PQBo 2DEN9Xe40XQ7le7AKVTLSPg5pjwa0fzYiRNVYEZJ26+K9n56oGHH3T6+1erTzcj7j5Z0 XIav3NBNYZHQ8zC2T5NwLbOAsqnuL17oEjoCfn0FYRYEzLJ2coRd0zFY0oJJ2P5VuCdn PxjsKE/+tzeDSvXbJO5xD0Rt9vLiayQ6l+RJjOakH4DCag+b1reKTYDtwjvhnweFqFQo 6vlLIQmIX873EUDt4BLn7dXw1yyN9W+PNtgYWDgBd/WFI6L4JBNrh7TNH46nkH0+Cb5b Jrow== MIME-Version: 1.0 X-Received: by 10.224.167.136 with SMTP id q8mr30815424qay.35.1405870956102; Sun, 20 Jul 2014 08:42:36 -0700 (PDT) Received: by 10.224.8.136 with HTTP; Sun, 20 Jul 2014 08:42:36 -0700 (PDT) Date: Sun, 20 Jul 2014 23:42:36 +0800 Message-ID: Subject: A TCP problem on High Delay From: Niu Zhixiong To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18 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: Sun, 20 Jul 2014 15:42:37 -0000 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 FreeBSD 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 faster 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 than 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-kern= el-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 10. 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 =E2=80=8B