From owner-freebsd-amd64@FreeBSD.ORG Sat Feb 20 20:50:01 2010 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BACE1065676 for ; Sat, 20 Feb 2010 20:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4D4428FC17 for ; Sat, 20 Feb 2010 20:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KKo1xk068165 for ; Sat, 20 Feb 2010 20:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o1KKo1Xa068164; Sat, 20 Feb 2010 20:50:01 GMT (envelope-from gnats) Resent-Date: Sat, 20 Feb 2010 20:50:01 GMT Resent-Message-Id: <201002202050.o1KKo1Xa068164@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-amd64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Emanuele A. Bagnaschi" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61E1C106566B for ; Sat, 20 Feb 2010 20:43:11 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 50A5C8FC14 for ; Sat, 20 Feb 2010 20:43:11 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o1KKhB3U041956 for ; Sat, 20 Feb 2010 20:43:11 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o1KKhBXO041955; Sat, 20 Feb 2010 20:43:11 GMT (envelope-from nobody) Message-Id: <201002202043.o1KKhBXO041955@www.freebsd.org> Date: Sat, 20 Feb 2010 20:43:11 GMT From: "Emanuele A. Bagnaschi" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 X-Mailman-Approved-At: Sat, 20 Feb 2010 23:58:55 +0000 Cc: Subject: amd64/144148: [msk] Slow network performance and high system cpu load while transfering data X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2010 20:50:01 -0000 >Number: 144148 >Category: amd64 >Synopsis: [msk] Slow network performance and high system cpu load while transfering data >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-amd64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Feb 20 20:50:00 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Emanuele A. Bagnaschi >Release: RELENG8 >Organization: >Environment: FreeBSD polaris 8.0-STABLE FreeBSD 8.0-STABLE #31: Fri Feb 19 18:55:27 CET 2010 toor@polaris:/usr/obj/usr/src/sys/POLARIS amd64 >Description: Hi, I've been experiencing a troubling issue with a Marvell 8072 NIC on an HP ProBook 4710s. I first noticed that there is a problem with the NIC while transferring some files with scp to a FreeBSD8-STABLE server: CPUs usage sky-rocketed to 100% (system) and network performance was awful (about 1.8 MiB/s). At first I reproduced the issue in a controlled way with 'ttcp' but I was informed on the FreeBSD stable mailing that it is better to use 'netperf' due to some problem with 'ttcp' threading code. Therefore I repeated the tests with netperf. The tests show that the maximum achievable transfer rate is about 2 MiB/s, that disabling tso and txcsum (as suggested by Pyun YongHyeon on the FreeBSD stable mailing list) help a bit but does not resolve the problem and that the NIC works as expected on Linux (so I think that we can rule out that the problem is server side). The 'ttcp' tests were also originally executed with MSI interrupts disabled, again with no improvements. All tests were run with no firewall on both systems. You can find the full 'netperf' output attached. Here it's some relevant information to identify the NIC: first from 'dmesg' mskc0: port 0x2000-0x20ff mem 0x90100000-0x90103fff irq 17 at device 0.0 on pci134 msk0: on mskc0 msk0: Ethernet address: 00:25:b3:52:fc:fa miibus0: on msk0 mskc0: [FILTER] msk0: link state changed to DOWN msk0: link state changed to UP and then from 'pciconf -lv' mskc0@pci0:134:0:0: class=0x020000 card=0x3074103c chip=0x436c11ab rev=0x10 hdr=0x00 vendor = 'Marvell Semiconductor (Was: Galileo Technology Ltd)' device = 'Marvell 8072 Ethernet Nic (88E8072)' class = network subclass = ethernet Here it's the output of 'ifconfig': msk0: flags=8843 metric 0 mtu 1500 options=19b ether 00:25:b3:52:fc:fa inet 192.168.1.4 netmask 0xffffff00 broadcast 192.168.1.255 media: Ethernet autoselect (100baseTX ) satus: active According to Pyun YongHyeon (again on the FreeBSD stable mailing lists), the NIC is a Yukon Extreme controller revision B0 and it is know that it has some silicon bugs. I know that, without errata and data sheets, probably there is not much that can be done at the moment, but I thought that filing a PR would be at least a good way to point out the issue. Thanks for any help. Best regards Emanuele A. Bagnaschi >How-To-Repeat: Transfer data trough the network interface. >Fix: Patch attached with submission follows: All netperf runs were executed with the following command line: netperf -T TCP_SENDFILE -H hostname -f 'M' -I 99,5 -i 10,2 -- * notebook - Linux 2.6.32 - hostname: elsinore * * server - FreeBSD8-STABLE - hostname:atlantis * FIRST RUN - netperf executed on elsinore (Linux - Laptop) TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to atlantis (192.168.1.1) port 0 AF_INET : +/-2.500% @ 99% conf. : cpu bind Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. MBytes/sec 65536 16384 16384 10.04 11.19 SECOND RUN - netperf executed on atlantis (FreeBSD - Server) TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to elsinore (192.168.1.4) port 0 AF_INET : +/-2.500% @ 99% conf. : cpu bind Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. MBytes/sec 87380 32768 32768 10.02 11.10 ----- * notebook - FreeBSD8-STABLE - hostname:polaris - msk with tcxsum and tso disabled * * server - FreeBSD8-STABLE - hostname:atlantis * FIRST RUN - netperf executed on polaris (FreeBSD - laptop) TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to atlantis (192.168.1.1) port 0 AF_INET : +/-2.500% @ 99% conf. : cpu bind !!! WARNING !!! Desired confidence was not achieved within the specified iterations. !!! This implies that there was variability in the test environment that !!! must be investigated before going further. !!! Confidence intervals: Throughput : 74.033% !!! Local CPU util : 0.000% !!! Remote CPU util : 0.000% Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. MBytes/sec 65536 32768 32768 11.44 2.23 SECOND RUN - netperf executed on atlantis (FreeBSD - server) TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to elsinore (192.168.1.4) port 0 AF_INET : +/-2.500% @ 99% conf. : cpu bind !!! WARNING !!! Desired confidence was not achieved within the specified iterations. !!! This implies that there was variability in the test environment that !!! must be investigated before going further. !!! Confidence intervals: Throughput : 10.916% !!! Local CPU util : 0.000% !!! Remote CPU util : 0.000% Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. MBytes/sec 65536 32768 32768 10.08 2.58 ----- * notebook - FreeBSD8-STABLE - hostname:polaris - msk with txcsum and tso enabled * * server - FreeBSD8-STABLE - hostname:atlantis * FIRST RUN - polaris transmits, atlantis receives TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to atlantis (192.168.1.1) port 0 AF_INET : +/-2.500% @ 99% conf. : cpu bind netperf: data send error: Connection reset by peer len was -1 SECOND RUN - polaris receives, atlantis transmits TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to elsinore (192.168.1.4) port 0 AF_INET : +/-2.500% @ 99% conf. : cpu bind !!! WARNING !!! Desired confidence was not achieved within the specified iterations. !!! This implies that there was variability in the test environment that !!! must be investigated before going further. !!! Confidence intervals: Throughput : 5.228% !!! Local CPU util : 0.000% !!! Remote CPU util : 0.000% Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. MBytes/sec 65536 32768 32768 10.08 2.63 >Release-Note: >Audit-Trail: >Unformatted: