From owner-freebsd-net@FreeBSD.ORG Mon Oct 7 23:57:31 2013 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 ESMTP id A520A99A for ; Mon, 7 Oct 2013 23:57:31 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-pb0-x22f.google.com (mail-pb0-x22f.google.com [IPv6:2607:f8b0:400e:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F10B2F14 for ; Mon, 7 Oct 2013 23:57:31 +0000 (UTC) Received: by mail-pb0-f47.google.com with SMTP id rr4so7823000pbb.34 for ; Mon, 07 Oct 2013 16:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ojZfAvZAbTqoYjOLf05JU5JXuExwOb1Z7oJN6llpYKk=; b=CRRTyS40retSGJRbUKzbIANk+P4gQtu166KQQFBH8Ng2c9RTm8154Gmk97YkBDiVdL nGWqER8lJr/1s27E8W9ym2QkCE4l7AuHfjLFSPE/jw2fTB88jQ7I/IxDxylubm9ZMv2l K1MAMkiAr0RJEPUtRV44CL7UfIXO4DcsHtp2lFSHIcKkrSooFN3mNgnlGsXO0yCQEWpx 2xzmPu9XSzbOMx6pkuWtZvFlmefdhGeIO8seTpZ9DSEEVjuUag7l0kAGryDoCECwd8Ft jq4O2RMy9T0WIPawKDeQ2Ur0cxWVx9wB8uwe1P8UJs949fSIWddHvAEcMV0EZXEvf7WG oEUA== MIME-Version: 1.0 X-Received: by 10.66.161.229 with SMTP id xv5mr89901pab.87.1381190251198; Mon, 07 Oct 2013 16:57:31 -0700 (PDT) Sender: kob6558@gmail.com Received: by 10.66.219.74 with HTTP; Mon, 7 Oct 2013 16:57:31 -0700 (PDT) In-Reply-To: <1381160691.954872513@f116.i.mail.ru> References: <1381160691.954872513@f116.i.mail.ru> Date: Mon, 7 Oct 2013 16:57:31 -0700 X-Google-Sender-Auth: Uy-Zh-9MNM_hysS9WCjBcbza46Q Message-ID: Subject: Re: Re[3]: Assymetric NIC performance problem From: Kevin Oberman To: Konstantin Kuzvesov Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Oct 2013 23:57:31 -0000 On Mon, Oct 7, 2013 at 8:44 AM, Konstantin Kuzvesov wrote: > > I've got a FreeBSD file server running Samba, file upload speeds are okay, > but downloads are too slow. > First, I decided it is Samba's fault, but then I ran iperf tests... > > On a windows machine with gigabit NIC: > Z:\iperf>iperf -c 192.168.0.1 > ------------------------------------------------------------ > Client connecting to 192.168.0.1, TCP port 5001 > TCP window size: 64.0 KByte (default) > ------------------------------------------------------------ > [ 3] local 192.168.0.2 port 1064 connected with 192.168.0.1 port 5001 > [ ID] Interval Transfer Bandwidth > [ 3] 0.0-10.2 sec 12.4 MBytes 10.2 Mbits/sec > > Z:\iperf>iperf -s > ------------------------------------------------------------ > Server listening on TCP port 5001 > TCP window size: 64.0 KByte (default) > ------------------------------------------------------------ > [ 4] local 192.168.0.2 port 5001 connected with 192.168.0.1 port 41220 > [ ID] Interval Transfer Bandwidth > [ 4] 0.0-10.0 sec 716 MBytes 600 Mbits/sec > > And on a another with FastEthernet NIC: > C:\iperf>iperf.exe -c 192.168.0.1 > ------------------------------------------------------------ > Client connecting to 192.168.0.1, TCP port 5001 > TCP window size: 64.0 KByte (default) > ------------------------------------------------------------ > [ 3] local 192.168.0.5 port 4756 connected with 192.168.0.1 port 5001 > [ ID] Interval Transfer Bandwidth > [ 3] 0.0-10.1 sec 11.4 MBytes 9.42 Mbits/sec > > C:\iperf>iperf.exe -s > ------------------------------------------------------------ > Server listening on TCP port 5001 > TCP window size: 64.0 KByte (default) > ------------------------------------------------------------ > [ 4] local 192.168.0.5 port 5001 connected with 192.168.0.1 port 18558 > [ ID] Interval Transfer Bandwidth > [ 4] 0.0-10.0 sec 106 MBytes 88.5 Mbits/sec > > Both tests show server's NIC performance degradation to around 10Mbit/s > when traffic goes from server to client. And everything works fine in other > direction. > > I verified the cables and hub by simply connecting server and a test > machine with a new short patch cord. I tried to change server's NIC from > D-Link DGE-528T to Planet ENW-9604. And it became even worse - > using Planet NIC > speeds slowed down to around 500Mbit/s to server and the same 10Mbit/s to > client. I tried to change NIC's media to 100BaseTX, it didn't help too. > What else should I try to fix the problem? Maybe my system requires is just > misconfigured? > > System configuration: > OS: FreeBSD 9.2-release > Kernel: generic > Firewall: none > /boot/loader.conf - load zfs modules only > /etc/sysctl.conf - empty > NIC: D-Link DGE-528T / Planet ENW-9604 > > > Hello, > > > > I have a problem with NIC performance. Is this the right place to ask > for help? > > > Probably, if you are able to provide some more detailed information :) > > -- > Konstantin Kuzvesov > Output from ifconfig would probably be helpful, but I'd also suggest that you capture packets (or, at least headers) for at least the start of the transfer and look at them with wireshark or some similar tool. wireshark can tell you quite a bit and, if you feed the capture into tcptrace, you can really see what is happening. (Note, wireshark provides indications of problems that can make sense to people not conversant with the gory details of TCP, though some issues may not be obvious. tcptrace output can be utterly cryptic if you don't understand a lot of the details of TCP and congestion control. Both wireshark and tcptrace are in ports and are best installed on a workstation. The tcpdump output can be used as input to both. ("tcpdump -pw FILE -i INTERFACE host ADDRESS" can do the job. Then copy the capture to the right place for analysis. But start with configuration and counters for the interface (netstat -i). -- R. Kevin Oberman, Network Engineer E-mail: rkoberman@gmail.com