From owner-freebsd-net@FreeBSD.ORG Mon Nov 7 18:02:01 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D051A1065672 for ; Mon, 7 Nov 2011 18:02:01 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 8CA4F8FC21 for ; Mon, 7 Nov 2011 18:02:01 +0000 (UTC) Received: by qyc1 with SMTP id 1so3315196qyc.13 for ; Mon, 07 Nov 2011 10:02:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=MT8SutIpGnxaanPUZ727MEGoiJn4DrSQOrczU6/Lx04=; b=BNr1eVGAoox0ic1lbRF8XwbZTF27EZOq6Hbywyuqr8ci/I9aMglqOwWXD3hxyURZuz Zs8YbpCqOuHMDLjxLt8nS8xl5zITPsOP3SpaBlM7ikBa/14q55B65BezBJTwKT1DxiOp pZwd9rZT9PLGDFvCacLGBi+V9305Mn56rehjQ= Received: by 10.68.36.166 with SMTP id r6mr872670pbj.77.1320688920146; Mon, 07 Nov 2011 10:02:00 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id c3sm38076460pbt.12.2011.11.07.10.01.57 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Nov 2011 10:01:58 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 07 Nov 2011 09:59:53 -0800 From: YongHyeon PYUN Date: Mon, 7 Nov 2011 09:59:53 -0800 To: Michael =?iso-8859-1?B?TGHf?= Message-ID: <20111107175953.GA1646@michelle.cdnetworks.com> References: <1320494003.19667.41.camel@bevan-pc.fritz.box> <20111106234054.GB1906@michelle.cdnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20111106234054.GB1906@michelle.cdnetworks.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: Gigabit Ethernet performance with Realtek 8111E X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2011 18:02:02 -0000 On Sun, Nov 06, 2011 at 03:40:54PM -0800, YongHyeon PYUN wrote: > On Sat, Nov 05, 2011 at 12:53:23PM +0100, Michael La?? wrote: > > Hi! > > > > I've got a small NAS with Intel D525MW (Atom) board inside using FreeBSD > > 9.0-RC1 as operating system. It has an onboard Realtek 8111E ethernet > > adapter. I'm experiencing heavy performance problems when transfering > > files from a specific PC in my network to that NAS. I did the following > > tests by transfering large amount of data between the diferrent machines > > (using dd and nc): > > > > NAS -> Linux1: ~ 400Mbit/s > > NAS -> Linux2: ~ 400Mbit/s > > Linux1 -> NAS: heavy fluctuation, between 700Mbit/s and 0bit/s > > Linux2 -> NAS: ~ 400Mbit/s > > Linux1 -> Linux2: ~ 400Mbit/s > > Linux2 -> Linux1: ~ 400Mbit/s > > > > As you can see everythink works fine except for transfering data from > > Linux1 to that NAS box. The following graph shows the problem: > > http://dl.dropbox.com/u/25455527/network-problems.png > > > > While the transfer rate drops to zero the NAS also has a very bad ping > > up to one second. Ping of Linux1 is perfectly fine during these outages. > > > > I also had a quick look on the data stream with wireshark on Linux1 and > > it shows a lot of TCP Dup ACK (up to 263 Dup ACKs created by NAS for one > > frame). > > > > What can be eliminated as a cause is: > > - Switch (I tried connecting Linux1 and NAS directly) > > - Cable (I changed that a few times) > > - Harddisk I/O (I'm only writing from /dev/zero to /dev/null) > > > > The sevirity of that problem varies from one minute to another but can > > always be reproduced with a few tries. > > > > When limiting either NAS or Linux1 to 100Mbit I'm getting a steady > > transfer rate of about 90Mbit/s. > > Some revisions of RealTek controller have FIFO overrun issue but > I'm not sure whether you're seeing the issue. Try enabling flow > control and see whether that makes any difference. You can enable > it by issuing 'ifconfig re0 media flow'. This should be read as 'ifconfig re0 mediaopt flow'. > > > When decreasing the MTU on NAS to 1200 the problem seems to disappear, > > getting a transfer rate of about 160Mbit/s. > > > > ifconfig re0: > > > re0: flags=8843 metric 0 mtu 1500 > > > options=388b > > > ether 38:60:77:3e:af:a5 > > > inet 192.168.178.54 netmask 0xffffff00 broadcast 192.168.178.255 > > > nd6 options=29 > > > media: Ethernet autoselect (1000baseT ) > > > status: active > > > > pciconf -lv: > > > re0@pci0:1:0:0: class=0x020000 card=0xd6258086 chip=0x816810ec rev=0x06 hdr=0x00 > > > vendor = 'Realtek Semiconductor Co., Ltd.' > > > device = 'RTL8111/8168B PCI Express Gigabit Ethernet controller' > > > class = network > > > subclass = ethernet > > > > Show me the dmesg output. RealTek uses the same device PCI ids so it's > impossible to know which controller you have from the pciconf(8) > output. > > > Because Linux1 seems to be involved in that problem: It's running Linux > > 3.0 and it has an "Atheros Communications AR8121/AR8113/AR8114" onboard. > > > > Does anyone have an idea what could be the problem here? Decreasing the > > MTU is some kind of solution but the performance is still not optimal > > and a MTU of 1500 should be no problem. > > > > Greetings, > > Michael Laß