Date: Mon, 11 Feb 2002 14:15:59 +0000 (GMT) From: Mike Silbersack <silby@silby.com> To: Alfred Perlstein <bright@mu.org> Cc: Tariq Rashid <tariq@inty.net>, <freebsd-net@FreeBSD.ORG> Subject: Re: squeeze more performance out of natd? Message-ID: <20020211140933.Y84750-100000@patrocles.silby.com> In-Reply-To: <20020211112645.F63886@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 11 Feb 2002, Alfred Perlstein wrote: > * Mike Silbersack <silby@silby.com> [020211 11:05] wrote: > > The best way to improve performance would probably be to rewrite natd to > > use kqueue instead of select. I'm not sure how difficult this would be, > > you might wish to talk to jlemon if you have any questions on the best way > > to tackle the project. > > That's what I thought initially, however the problem is that each > packet requires at least a select(2) then recvfrom(2) and then possibly > a sendto(2). The select(2) loop is particulary niave as the dispatched > functions will only pull one packet from the socket instead of looping > until the outstanding data is removed. > > Yes, > 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. :) Mike "Silby" Silbersack 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?20020211140933.Y84750-100000>