Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jul 2010 07:32:25 -0700
From:      Garrett Cooper <yanefbsd@gmail.com>
To:        Aleksandr A Babaylov <.@babolo.ru>
Cc:        Pyun YongHyeon <pyunyh@gmail.com>, net@freebsd.org
Subject:   Re: Poor performance with natd/ipfw and TSO enabled on bce(4) card  and 8.1-PRERELEASE
Message-ID:  <AANLkTime6tei896VZp-fTfQKgYqyuDf4XTPxkzU3ZNy7@mail.gmail.com>
In-Reply-To: <AANLkTinJPvYJcKihX8rXAsoBilAbiornPwdYcn81glAW@mail.gmail.com>
References:  <AANLkTinuucNtKqWscZ9IDjws-NiNcHpKrMElLgd7Sb8r@mail.gmail.com> <20100701235447.GJ7090@michelle.cdnetworks.com> <20100702022058.GA32531@babolo.ru> <AANLkTinJPvYJcKihX8rXAsoBilAbiornPwdYcn81glAW@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 1, 2010 at 10:32 PM, Garrett Cooper <yanefbsd@gmail.com> wrote:
> 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 =
have
>>> > 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
>
> =A0 =A0That 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.

    As Vitezslav pointed out to me off-list, this is a known issue
with libalias and IPFW:

     Due to the architecture of libalias(3), ipfw nat is not compatible wit=
h
     the TCP segmentation offloading (TSO).  Thus, to reliably nat your net=
-
     work traffic, please disable TSO on your NICs using ifconfig(8).

    Both the ipfw kernel based nat'ing and natd use libalias, so both
will be affected by this issue. This needs to be fixed (I'll see what
I can do to help expedite this).
Thanks,
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTime6tei896VZp-fTfQKgYqyuDf4XTPxkzU3ZNy7>