From owner-freebsd-current@FreeBSD.ORG Mon Aug 23 09:55:08 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD3F316A4CE; Mon, 23 Aug 2004 09:55:08 +0000 (GMT) Received: from pathfinder.roks.biz (roks.biz [82.207.80.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3D5E43D41; Mon, 23 Aug 2004 09:55:05 +0000 (GMT) (envelope-from padla@roks.biz) Received: from admin.office.roks.biz (admin.office.roks.biz [192.168.100.103]) by pathfinder.roks.biz (8.12.11/8.12.11) with ESMTP id i7N9t1Uh072799; Mon, 23 Aug 2004 12:55:01 +0300 (EEST) (envelope-from padla@pathfinder.roks.biz) Received: from admin.office.roks.biz (localhost.roks.biz [127.0.0.1]) i7N9t2oO001089; Mon, 23 Aug 2004 12:55:02 +0300 (EEST) (envelope-from padla@admin.office.roks.biz) Received: (from padla@localhost) by admin.office.roks.biz (8.12.11/8.12.11/Submit) id i7N9t28Z001088; Mon, 23 Aug 2004 12:55:02 +0300 (EEST) (envelope-from padla) Date: Mon, 23 Aug 2004 12:55:02 +0300 From: Nikolay Pavlov To: freebsd-performance@freebsd.org Message-ID: <20040823095502.GA757@roks.biz> Mail-Followup-To: Nikolay Pavlov , freebsd-performance@freebsd.org, freebsd-current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i cc: freebsd-current@freebsd.org Subject: Poor results of network perfomance with 5.2.1-p9. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2004 09:55:08 -0000 Hi, FreeBSD users. I have made a smimple test of my network connection and have received rather modest results of network perfomance. Here is my test conditions: ------------------------------ |FreeBSD4.10-p2 CUSTOM kernel| |LANRealTek100Mb/s | |192.168.35.3 | ------------------------------ | | ------------------------------ |D-Link DWL-900AP+ | |Wireless11Mb/s | ------------------------------ | | ------------------------------ |Wireless11Mb/s | |D-Link DWL-900AP+ | ------------------------------ | | ------------------------------- |192.168.35.4 | |LANRealTek100Mb/s | |FreeBSD5.2.1-p9 CUSTOM kernel| ------------------------------- For my tests I use benchmarks/netperf (TCP client-server model) and net/pchar (don't need special server on the other side, test based on UDP/ICMP rtt). Results: 1. From 4.10 side: 1.1. pchar test using UDP ============================================================================= pathfinder# pchar 192.168.35.4 pchar to 192.168.35.4 (192.168.35.4) using UDP/IPv4 Using raw socket input Packet size increments from 32 to 1500 by 32 46 test(s) per repetition 32 repetition(s) per hop 0: 192.168.35.3 (pathfinder) Partial loss: 0 / 1472 (0%) Partial char: rtt = 1.678817 ms, (b = 0.002133 ms/B), r2 = 0.999667 stddev rtt = 0.004743, stddev b = 0.000006 Partial queueing: avg = 0.000310 ms (145 bytes) Hop char: rtt = 1.678817 ms, bw = 3750.725109 Kbps Hop queueing: avg = 0.000310 ms (145 bytes) 1: 192.168.35.4 (pioneer) Path length: 1 hops Path char: rtt = 1.678817 ms r2 = 0.999667 Path bottleneck: 3750.725109 Kbps ^^^^^^^^^^^^^^^^ Path pipe: 787 bytes Path queueing: average = 0.000310 ms (145 bytes) Start time: Mon Aug 23 11:34:40 2004 End time: Mon Aug 23 11:40:54 2004 1.2. netperf test using TCP_STREAM ============================================================================ pathfinder# /usr/local/netperf/netperf -v 2 -H 192.168.35.4 TCP STREAM TEST to 192.168.35.4 : histogram Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 131072 131072 131072 10.23 4.25 ^^^^^^^^^^^^ Alignment Offset Bytes Bytes Sends Bytes Recvs Local Remote Local Remote Xfered Per Per Send Recv Send Recv Send (avg) Recv (avg) 8 8 0 0 5.436e+06 132580.29 41 1492.12 3643 Maximum Segment Size (bytes) 1448 Histogram of time spent in send() call. TENTH_MSEC : 0: 0: 0: 0: 0: 0: 1: 0: 0: 0 UNIT_MSEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0 TEN_MSEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0 HUNDRED_MSEC : 0: 2: 34: 4: 0: 0: 0: 0: 0: 0 UNIT_SEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0 TEN_SEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0 >100_SECS: 0 HIST_TOTAL: 41 2. From 5.2.1 side: 2.1. pchar test using UDP ============================================================================ pioneer# pchar 192.168.35.3 pchar to 192.168.35.3 (192.168.35.3) using UDP/IPv4 Using raw socket input Packet size increments from 32 to 1500 by 32 46 test(s) per repetition 32 repetition(s) per hop 0: 192.168.35.4 (pioneer) Partial loss: 84 / 1472 (5%) Partial char: rtt = 1.621225 ms, (b = 0.002300 ms/B), r2 = 0.946789 stddev rtt = 0.066426, stddev b = 0.000082 Partial queueing: avg = 0.002433 ms (1057 bytes) Hop char: rtt = 1.621225 ms, bw = 3477.844143 Kbps Hop queueing: avg = 0.002433 ms (1057 bytes) 1: 192.168.35.3 (pathfinder) Path length: 1 hops Path char: rtt = 1.621225 ms r2 = 0.946789 Path bottleneck: 3477.844143 Kbps Path pipe: 704 bytes Path queueing: average = 0.002433 ms (1057 bytes) Start time: Mon Aug 23 11:20:24 2004 End time: Mon Aug 23 11:30:39 2004 2.2. netperf test using TCP_STREAM ============================================================================ pioneer# /usr/local/netperf/netperf -v 2 -H 192.168.35.3 TCP STREAM TEST to 192.168.35.3 : histogram Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 131072 131072 131072 10.75 0.64 ^^^^^^^^^^^^^ Alignment Offset Bytes Bytes Sends Bytes Recvs Local Remote Local Remote Xfered Per Per Send Recv Send Recv Send (avg) Recv (avg) 8 8 0 0 8.601e+05 143352.00 6 1455.35 591 Maximum Segment Size (bytes) 1448 Histogram of time spent in send() call. TENTH_MSEC : 0: 0: 0: 0: 0: 0: 1: 0: 0: 0 UNIT_MSEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0 TEN_MSEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0 HUNDRED_MSEC : 0: 0: 0: 0: 0: 0: 0: 1: 3: 0 UNIT_SEC : 0: 0: 0: 0: 0: 0: 1: 0: 0: 0 TEN_SEC : 0: 0: 0: 0: 0: 0: 0: 0: 0: 0 >100_SECS: 0 HIST_TOTAL: 6 As you can see there is almost no diffrence between pchar udp tests (3750.725109 Kbps against 3477.844143 Kbps), but in netperf test 4.10 in 10.23 sec has made 41 send() (4.25Mb/s) against 6! send() in 10.75 sec (0.64Mb/s). What is the secret of so poor perfomance? Could you please help me in correct understanding of this test? P.S. Some additional information: There is no WITNESS, INVARIANTS, INVARIANT_SUPPORT, SMP in 5.2.1 kernel. ipfw_type=OPEN in 5.2.1 and corresponding pass rule in top off firewall ruleset in 4.10. tcp.sendspace and recvspace = 131072 in both OS. In test I use "clear" conditions, but in real work this connection is ecrypted by IPsec so my working productivity is much more slower. If you need more info just let me know. Best regards and sorry for my english, Nikolay Pavlov.