Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Feb 2002 23:39:39 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        Ari Suutari <ari.suutari@syncrontech.com>
Cc:        Mike Silbersack <silby@silby.com>, Tariq Rashid <tariq@inty.net>, freebsd-net@FreeBSD.ORG
Subject:   Re: squeeze more performance out of natd?
Message-ID:  <20020211233939.M63886@elvis.mu.org>
In-Reply-To: <200202120650.g1C6o7L40811@guinness.syncrontech.com>; from ari.suutari@syncrontech.com on Tue, Feb 12, 2002 at 08:50:07AM %2B0200
References:  <20020211140933.Y84750-100000@patrocles.silby.com> <200202120650.g1C6o7L40811@guinness.syncrontech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Ari Suutari <ari.suutari@syncrontech.com> [020211 22:50] wrote:
> Hi,
> 
> 
> On Monday 11 February 2002 16:15, Mike Silbersack wrote:
> > On Mon, 11 Feb 2002, Alfred Perlstein wrote:
> > 
> > > another way would be to loop doing recvfrom's until EAGAIN is returned,
> > > I suspect this may give at least a 2 fold increase in performance and
> > > is trivial to accomplish.
> > 
> > Wow.  Yeah, it sounds like that change would make more of a difference
> > than moving away from select().  Tell us how it works, Tariq. :)
> > 
> 
> 	Natd doesn't use select if you use alias address instead of interface
> 	name. In this case there is just simple recvfrom - sendto loop.

Yes, that looks right, still, that case probably doesn't perform
all that well at all and could be improved.

> 	The select is there currently mostly to get information from routing
> 	socket which is needed on DHCP / PPP environments. There
> 	was also second purpose - to check space on output socket -
> 	but it has been found unnecessary recently and I think it
> 	was removed from -current, at least.

I guess then it looks like natd really either wants batch-recvfrom/sendto
or to be moved into the kernel for higher performance.

-- 
-Alfred Perlstein [alfred@freebsd.org]

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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