From owner-freebsd-performance@FreeBSD.ORG Sat Oct 17 20:36:42 2009 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 559C61065692 for ; Sat, 17 Oct 2009 20:36:42 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from proxy.meer.net (proxy.meer.net [64.13.141.13]) by mx1.freebsd.org (Postfix) with ESMTP id ED0978FC0C for ; Sat, 17 Oct 2009 20:36:41 +0000 (UTC) Received: from mail.meer.net (mail.meer.net [64.13.141.3]) by proxy.meer.net (8.14.3/8.14.3) with ESMTP id n9HKsZTd003384 for ; Sat, 17 Oct 2009 13:54:35 -0700 (PDT) (envelope-from gnn@neville-neil.com) Received: from mail2.meer.net (mail2.meer.net [64.13.141.16]) by mail.meer.net (8.13.3/8.13.3/meer) with ESMTP id n9HKMmCs051552; Sat, 17 Oct 2009 13:22:48 -0700 (PDT) (envelope-from gnn@neville-neil.com) Received: from [172.16.1.4] (cpe-68-175-77-169.nyc.res.rr.com [68.175.77.169]) (authenticated bits=0) by mail2.meer.net (8.14.1/8.14.3) with ESMTP id n9HKMlDF087767 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 17 Oct 2009 13:22:48 -0700 (PDT) (envelope-from gnn@neville-neil.com) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: George Neville-Neil In-Reply-To: <0D9BF9F3-FDA1-4111-9E6C-733E1FD972F5@mac.com> Date: Sat, 17 Oct 2009 16:22:47 -0400 Content-Transfer-Encoding: 7bit Message-Id: References: <78DB4AE8EF5F4A1EBD3992D7404B2725@china.huawei.com> <4831593800614E6796A45F20BA4B818E@china.huawei.com> <001301ca4e23$b96e35b0$3322c10a@china.huawei.com> <001c01ca4e24$f10f6e70$3322c10a@china.huawei.com> <20091016075336.03eb17f2.wmoran@collaborativefusion.com> <000001ca4f3c$78dc3550$6501a8c0@china.huawei.com> <0D9BF9F3-FDA1-4111-9E6C-733E1FD972F5@mac.com> To: Chuck Swiger X-Mailer: Apple Mail (2.1076) X-Spam-Score: undef - spam scanning disabled X-CanIt-Geo: ip=64.13.141.3; country=US; region=CA; city=Mountain View; postalcode=94039; latitude=37.3974; longitude=-122.0732; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.3974,-122.0732&z=6 X-CanItPRO-Stream: default X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 64.13.141.13 X-Mailman-Approved-At: Sun, 18 Oct 2009 03:30:56 +0000 Cc: Steve Dong , freebsd-performance@freebsd.org Subject: Re: Comparison of FreeBSD/Linux TCP Throughput performance X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2009 20:36:42 -0000 Hi, Trying to chime in with a few pointers here. Things to check when doing a TCP benchmark on FreeBSD. In particular make sure to adjust theses: net.inet.tcp.recvbuf_max: 262144 net.inet.tcp.recvbuf_inc: 16384 net.inet.tcp.recvbuf_auto: 1 net.inet.tcp.sendbuf_max: 262144 net.inet.tcp.sendbuf_inc: 8192 net.inet.tcp.sendbuf_auto: 1 Leave the auto on, but increase the max values and you should probably also change the inc (increment) values as well. Make sure that if you increase the buffer sizes you increase your number of mbufs and clusters as well. See kern.ipc.nmbclusters, which is a kernel tunable that can be set in /boot/loader.conf . Make sure that both of the systems you're testing have the same low level hardware support such as TCP Segment Offload (TSO) and TCP Checkusm Offload are turned on. Also you might want to turn this off: net.inet.tcp.inflight.enable: 1 This page http://fasterdata.es.net/TCP-tuning/FreeBSD.html claims that it can harm high speed connections. Those are the basics to start with. A search of "Tuning FreeBSD TCP" turns up some decent pages as well. Best, George