From owner-freebsd-performance@FreeBSD.ORG Thu Dec 10 12:43:36 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 071531065695 for ; Thu, 10 Dec 2009 12:43:36 +0000 (UTC) (envelope-from noisex@apollo.lv) Received: from smtp1.apollo.lv (smtp1.apollo.lv [80.232.168.211]) by mx1.freebsd.org (Postfix) with ESMTP id 4C2258FC1B for ; Thu, 10 Dec 2009 12:43:34 +0000 (UTC) X-Virusscan: Clamd Received: from [195.122.14.116] (HELO VECTOR) by smtp1.apollo.lv (CommuniGate Pro SMTP 5.2.10) with ESMTP id 644670455 for freebsd-performance@freebsd.org; Mon, 07 Dec 2009 14:42:05 +0200 From: "Noisex" To: References: <4B108A18.207@truschinski.de> <584ec6bb0911291330o11fba282y400e0abf121f5e7f@mail.gmail.com> In-Reply-To: Date: Mon, 7 Dec 2009 14:41:55 +0200 Message-ID: <056c01ca773a$a88f69e0$f9ae3da0$@lv> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acpxs88IRD8Wm3IRTcmTdnq5YVSP/gFhOnqw Content-Language: lv x-cr-hashedpuzzle: lXE= AmjK BJ8X B9fT CRlg DQTS DmOg H+tE Imx4 Itfq Jrb8 Ju5+ KssF LDaJ MNNn M8dK; 1; ZgByAGUAZQBiAHMAZAAtAHAAZQByAGYAbwByAG0AYQBuAGMAZQBAAGYAcgBlAGUAYgBzAGQALgBvAHIAZwA=; Sosha1_v1; 7; {CD3E0749-CB82-4A08-B143-BCBBB45C6D4C}; bgBvAGkAcwBlAHgAQABhAHAAbwBsAGwAbwAuAGwAdgA=; Mon, 07 Dec 2009 12:41:52 GMT; RgByAGUAZQBCAFMARAAgAFQAQwBQACAAdAB1AG4AaQBuAGcAIABhAG4AZAAgAHAAZQByAGYAbwByAG0AYQBuAGMAZQA= x-cr-puzzleid: {CD3E0749-CB82-4A08-B143-BCBBB45C6D4C} Subject: FreeBSD TCP tuning and 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: Thu, 10 Dec 2009 12:43:36 -0000 Hi! I have a problem with TCP performance on FBSD boxes with 1Gbps net = i-faces (Broadcom NetXtreme II BCM5708 1000Base-T (B2)). Currently i use = FBSD 7.1 AMD64. The test lab: 2 x (server-client) HP Proliant G5 DL360 (quad-core/8gb = ram, raid 5 SAS). For net benchmark i used nuttcp and iperf. The servers (client-server) are in 1 VLAN. The results on 1Gbps (down & up): 63.4375 MB / 1.00 sec =3D 532.1332 Mbps 64.3750 MB / 1.00 sec =3D 540.0426 Mbps 62.8125 MB / 1.00 sec =3D 526.8963 Mbps 64.5625 MB / 1.00 sec =3D 541.6318 Mbps 63.9375 MB / 1.00 sec =3D 536.3595 Mbps 63.7500 MB / 1.00 sec =3D 534.7566 Mbps 63.0000 MB / 1.00 sec =3D 528.5003 Mbps 63.5000 MB / 1.00 sec =3D 532.7150 Mbps 64.0000 MB / 1.00 sec =3D 536.8586 Mbps 63.5625 MB / 1.00 sec =3D 533.2452 Mbps =20 637.6688 MB / 10.02 sec =3D 533.9108 Mbps 9 %TX 9 %RX 9 = host-retrans 0.67 msRTT 25.5625 MB / 1.00 sec =3D 214.3916 Mbps 30.8750 MB / 1.00 sec =3D 259.0001 Mbps 29.9375 MB / 1.00 sec =3D 251.1347 Mbps 27.1875 MB / 1.00 sec =3D 228.0669 Mbps 30.5000 MB / 1.00 sec =3D 255.8533 Mbps 30.2500 MB / 1.00 sec =3D 253.7551 Mbps 26.8125 MB / 1.00 sec =3D 224.9211 Mbps 30.3750 MB / 1.00 sec =3D 254.8047 Mbps 30.3750 MB / 1.00 sec =3D 254.8050 Mbps 30.0625 MB / 1.00 sec =3D 252.1835 Mbps 292.2155 MB / 10.02 sec =3D 244.6825 Mbps 10 %TX 12 %RX 0 = host-retrans 0.71 msRTT As you can see down is littlebit more than half of full link speed. And = upload is only 20-25% of full link. I tried to change a lot sysctl params but without a big results. = Currenlty my entries in /etc/sysctl.conf which regarding to TCP: #kernel tuning, tcp kern.ipc.somaxconn=3D2048 kern.ipc.nmbclusters=3D32768 kern.ipc.maxsockbuf=3D8388608 net.inet.tcp.sendbuf_max=3D16777216 net.inet.tcp.recvbuf_max=3D16777216 net.inet.tcp.inflight.enable=3D0 net.inet.tcp.sendspace=3D65536 net.inet.tcp.recvspace=3D65536 net.inet.udp.recvspace=3D65536 net.inet.tcp.inflight.enable=3D0 net.inet.tcp.rfc1323=3D1 net.inet.tcp.sack.enable=3D1 net.inet.tcp.path_mtu_discovery=3D1 net.inet.tcp.sendbuf_auto=3D1 net.inet.tcp.sendbuf_inc=3D16384 net.inet.tcp.recvbuf_auto=3D1 net.inet.tcp.recvbuf_inc=3D524288 Do you have some kind suggestion what i could to change to increase the = performance of TCP?=20 Besides when i make the benchamrks i run the sniffer to see whats = happening with network..sometimes i saw that window size is 0...does it = mean that server can't handle something or recieve buffer size is to = small? p.s sory for my bad english :) Noisex