From owner-freebsd-net@FreeBSD.ORG Fri Jul 2 05:32:56 2010 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EF4C1065672 for ; Fri, 2 Jul 2010 05:32:56 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 36D788FC15 for ; Fri, 2 Jul 2010 05:32:55 +0000 (UTC) Received: by qwg5 with SMTP id 5so1246863qwg.13 for ; Thu, 01 Jul 2010 22:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=iixZnUzJYZ+PpugQ18Rql7POzeyMTxax/vgWRotJKrQ=; b=WvoQ0clIP4/57dcJtmhyulQ1hgXIKi5qTpLDKBh9Jka/Duh/2EgOZWuKvyw119JWz3 mTHtEbZacsmg06zmsSUDk1VsoLQCyNocXIrRicOPaJAtiztBuNx6+uGEr+lL9lwABylE yURlwnm6pvvqxYaBBuK3/jTnGmPe2/EYiwXQA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=VAdjx56e1H+zDJyh4pHo+DPc2MxwD9mVtUG9T3LgUEi1gHOCNWhcNYAlAYJkA0R+Mb yMydvnZR1OHkuUqJuUBs7sl99tZ9I9xWEd1Ap7enbzfiupfBaeRJ1Qd5oErCv7tNUZ/c ig080OPowfz0OdD3SuQzTHkGokU0EXtqM6qR0= MIME-Version: 1.0 Received: by 10.229.96.213 with SMTP id i21mr112218qcn.198.1278048757263; Thu, 01 Jul 2010 22:32:37 -0700 (PDT) Received: by 10.229.221.83 with HTTP; Thu, 1 Jul 2010 22:32:37 -0700 (PDT) In-Reply-To: <20100702022058.GA32531@babolo.ru> References: <20100701235447.GJ7090@michelle.cdnetworks.com> <20100702022058.GA32531@babolo.ru> Date: Thu, 1 Jul 2010 22:32:37 -0700 Message-ID: From: Garrett Cooper To: Aleksandr A Babaylov <.@babolo.ru> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Pyun YongHyeon , net@freebsd.org Subject: Re: Poor performance with natd/ipfw and TSO enabled on bce(4) card and 8.1-PRERELEASE X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 05:32:56 -0000 On Thu, Jul 1, 2010 at 7:20 PM, Aleksandr A Babaylov <.@babolo.ru> wrote: > On Thu, Jul 01, 2010 at 04:54:47PM -0700, Pyun YongHyeon wrote: >> On Wed, Jun 30, 2010 at 07:00:53PM -0700, Garrett Cooper wrote: >> > Hi, >> > =A0 =A0 Just an observation I made while transferring a file: >> > >> > # time scp floppy.img somehost: >> > Password: >> > floppy.img =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0100% 1440KB =A013.7KB/s =A0 01:45 >> > >> > real =A0 =A0 =A0 =A01m59.400s >> > user =A0 =A0 =A0 =A00m0.031s >> > sys 0m0.028s >> > # sysctl net.inet.tcp.tso=3D0 >> > net.inet.tcp.tso: 1 -> 0 >> > # time scp floppy.img somehost: >> > floppy.img =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0100% 1440KB =A0 1.4MB/s =A0 00:00 >> > >> > real =A0 =A0 =A0 =A00m0.712s >> > user =A0 =A0 =A0 =A00m0.018s >> > sys 0m0.018s >> > >> > =A0 =A0 Going ISDN speeds transferring a 1.44MB file is sad when you h= ave >> > a gigabit uplink :(... natd seems to be doing a LOT of spinning when >> > TSO is enabled (it's going up to 73% CPU on a dual-proc quad-core >> > machine). >> I would use pf(4) if I have to handle lots of NAT rules. > Or ipfw nat. > man ipfw | grep nat That uses the kernel module though, and that's horribly broken on my machine with 8-STABLE/9-CURRENT (see: http://www.mail-archive.com/freebsd-net@freebsd.org/msg33518.html ). I wonder if that's related to the TSO issue. Thanks! -Garrett