From owner-freebsd-net Mon Feb 11 23:40:30 2002 Delivered-To: freebsd-net@freebsd.org Received: from guinness.syncrontech.com (guinness.syncrontech.com [62.71.8.19]) by hub.freebsd.org (Postfix) with ESMTP id 5DE9D37B404 for ; Mon, 11 Feb 2002 23:40:16 -0800 (PST) Received: from there (coffee.syncrontech.com [62.71.8.37]) by guinness.syncrontech.com (8.11.6/8.11.6) with SMTP id g1C6o7L40811; Tue, 12 Feb 2002 08:50:12 +0200 (EET) (envelope-from ari.suutari@syncrontech.com) Message-Id: <200202120650.g1C6o7L40811@guinness.syncrontech.com> Content-Type: text/plain; charset="iso-8859-1" From: Ari Suutari To: Mike Silbersack , Alfred Perlstein Subject: Re: squeeze more performance out of natd? Date: Tue, 12 Feb 2002 08:50:07 +0200 X-Mailer: KMail [version 1.3.2] Cc: Tariq Rashid , References: <20020211140933.Y84750-100000@patrocles.silby.com> In-Reply-To: <20020211140933.Y84750-100000@patrocles.silby.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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. 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. Ari S. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message