From owner-freebsd-stable@FreeBSD.ORG Sun Nov 7 06:19:35 2010 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 098DF1065670 for ; Sun, 7 Nov 2010 06:19:35 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id B6BE08FC12 for ; Sun, 7 Nov 2010 06:19:34 +0000 (UTC) Received: by qyk7 with SMTP id 7so3747573qyk.13 for ; Sat, 06 Nov 2010 23:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=O7rtAE59kZlWVK+VrOJCUkGtax5hCMAoqXBZLdMPP7g=; b=rT5CNhPxqc+AxuiyhR3JdAdNk4LqVpZCMH9qgiR3UgD3uGU3wPSQuz9FMYFrM7WpGS DVVkLnxLnBIr7oBaNjSKwfRBxtBrYh/TRG/CwImx8EbAG3QsZb6quu5q/dXDIklwLbFb QHXLqSmrfWtwvtKn63WrCvMjES2GFgoJFHLUc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; b=OASLy8o3m5+me6r1SVAFxwe/p7PEvk8pdt36S7ozsgaQi33FpnLJHunj8iBNtDO88+ 8vsXKpV6Tj4odyW+8fd5KzxfdmhQbqsloNKRa84uiccFWSDVOzvddPATDeZTLvsHXjaS sOXfJKezoyIJH1m5aQOoaxQA12lLUTQ3toJh8= MIME-Version: 1.0 Received: by 10.224.3.14 with SMTP id 14mr2716313qal.52.1289110773878; Sat, 06 Nov 2010 23:19:33 -0700 (PDT) Received: by 10.220.200.11 with HTTP; Sat, 6 Nov 2010 23:19:33 -0700 (PDT) In-Reply-To: <20101106093700.GW85693@acme.spoerlein.net> References: <20101106093700.GW85693@acme.spoerlein.net> Date: Sat, 6 Nov 2010 23:19:33 -0700 Message-ID: From: Pyun YongHyeon To: =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: stable@freebsd.org Subject: Re: Abysmal re(4) performance under 8.1-STABLE (mid-August) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Nov 2010 06:19:35 -0000 On Sat, Nov 6, 2010 at 2:37 AM, Ulrich Sp=F6rlein wrote= : > Hello Pyun, > > On this new server, I cannot get more than ~280kByte/s up/downstream out = of > re(4) without any tweaking. > > re0: flags=3D8843 metric 0 mtu 15= 00 > =A0 =A0 =A0 =A0options=3D389b > =A0 =A0 =A0 =A0ether 00:21:85:63:74:34 > =A0 =A0 =A0 =A0inet6 fe80::221:85ff:fe63:7434%re0 prefixlen 64 scopeid 0x= 1 > =A0 =A0 =A0 =A0inet 46.4.12.147 netmask 0xffffffc0 broadcast 46.4.12.191 > =A0 =A0 =A0 =A0nd6 options=3D3 > =A0 =A0 =A0 =A0media: Ethernet autoselect (100baseTX ) > =A0 =A0 =A0 =A0status: active > It seems the link was resolved to half-duplex. Does link partner also agree on the resolved speed/duplex? > re0@pci0:2:0:0: class=3D0x020000 card=3D0x368c1462 chip=3D0x816810ec rev= =3D0x01 hdr=3D0x00 > =A0 =A0vendor =A0 =A0 =3D 'Realtek Semiconductor' > =A0 =A0device =A0 =A0 =3D 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8= 111c)' > =A0 =A0class =A0 =A0 =A0=3D network > =A0 =A0subclass =A0 =3D ethernet > > re0: port 0xd800-= 0xd8ff mem 0xfeaff000-0xfeafffff irq 19 at device 0.0 on pci2 > re0: Using 1 MSI messages > re0: Chip rev. 0x38000000 > re0: MAC rev. 0x00000000 > miibus0: on re0 > rgephy0: PHY 1 on miibus0 > rgephy0: =A010baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 10= 00baseT-FDX, auto > re0: Ethernet address: 00:21:85:63:74:34 > re0: [FILTER] > > > It's interesting to note, that re0 only negotiates half-duplex, where > linux will negotiate full-duplex (and gets ~10MByte/s as expected). > > Next, I disabled almost all options, except that I cannot disable > VLAN_MTU, VLAN_HWCSUM. I also forced the adapter into full-duplex. > > # ifconfig re0 -vlanmtu > # ifconfig re0 -vlanhwcsum > ifconfig: -vlanhwcsum: bad value I'm sure this has nothing to do that this issue. If you want to disable checksum offloading of VLAN interface, use vlan interface instead of parent interface of the VLAN interface(i.e. ifconfig vlan0 -txcsum -rxcsum). And you can't disable VLAN_MTU on re(4). There is no reason to disable supporting VLAN oversized frames. > # ifconfig re0 > re0: flags=3D8843 metric 0 mtu 15= 00 > =A0 =A0 =A0 =A0options=3D88 > =A0 =A0 =A0 =A0ether 00:21:85:63:74:34 > =A0 =A0 =A0 =A0inet6 fe80::221:85ff:fe63:7434%re0 prefixlen 64 scopeid 0x= 1 > =A0 =A0 =A0 =A0inet 46.4.12.147 netmask 0xffffffc0 broadcast 46.4.12.191 > =A0 =A0 =A0 =A0nd6 options=3D3 > =A0 =A0 =A0 =A0media: Ethernet 100baseTX (100baseTX ) > =A0 =A0 =A0 =A0status: active > This time, it seems you used forced media configuration instead of auto. It still shows duplex mismatch so it's normal to see poor performance. What makes me wonder is why you have duplex mismatch? Did you use forced media configuration on link partner? What happens when you use different switch? > If I then immediately start the test-download, I get a ~2MByte/s spike, > which quickly returns to something around 250kByte/s. > > Booting with > hw.pci.enable_msix=3D0 > hw.pci.enable_msi=3D0 > > I can get almost up to 400kByte/s, but this may be coincidence. > > So this is usually as far as it gets: > > re0 =A0in =A0 =A0190.504 KB/s =A0 =A0 =A0 =A0246.136 KB/s =A0 =A0 =A0 =A0= =A0 66.709 MB > =A0 =A0 out =A0 =A010.290 KB/s =A0 =A0 =A0 =A0 12.985 KB/s =A0 =A0 =A0 = =A0 =A0 =A06.076 MB > > But then I ran tcpdump in another session, and it looks like the ssh traf= fic on > the upstream of the interface will make the downloads running in another = window > go faster: > > re0 =A0in =A0 =A0805.961 KB/s =A0 =A0 =A0 =A0 =A01.577 MB/s =A0 =A0 =A0 = =A0 =A0116.523 MB > =A0 =A0 out =A0 222.940 KB/s =A0 =A0 =A0 =A0502.045 KB/s =A0 =A0 =A0 =A0 = =A0 19.267 MB > > Any ideas? > > Uli >