From owner-freebsd-net Wed Feb 13 1:14:36 2002 Delivered-To: freebsd-net@freebsd.org Received: from freddy.inty.net (freddy.inty.net [195.224.93.243]) by hub.freebsd.org (Postfix) with ESMTP id 3492B37B402 for ; Wed, 13 Feb 2002 01:14:18 -0800 (PST) Received: from inty.hq.inty.net (inty.hq.inty.net [213.38.150.150]) by freddy.inty.net (8.11.3/8.11.3) with ESMTP id g1D9EE323030 for ; Wed, 13 Feb 2002 09:14:14 GMT Received: from tariq ([10.0.1.156]) by inty.hq.inty.net (8.12.1/8.12.1) with SMTP id g1D9EEYl021757 for ; Wed, 13 Feb 2002 09:14:14 GMT From: "Tariq Rashid" To: Subject: RE: squeeze more performance out of natd? Date: Wed, 13 Feb 2002 09:17:25 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <20020211213015.GO90229@overlord.e-gerbil.net> X-Sender-IP: 10.0.1.156 X-INT-DeliveryDone: g1D9EEYl021757 X-suppress-rcpt-virus-notify: yes X-Skip-Virus-Check: yes X-Virus-Checked: 53454 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 i tried altering the code to do teh following: 1. when select returns saying the file descriptor is readable: 2. process 2 packets at a time (recvfrom woould just fail if there were none left) 3. try this with 3 and 5 packets at a time Surprisingly (for me) I noticed * the natd CPU load still reaches similar levels before the change * using -a alias_ip instead if -interface and using debugging code to ensure that select was NOT used (as mentioned by ari, earlier) also appears not to significantly reduce CPU (eg peak 23% down to peak 21%) Considering the following facts: * cpu load rises roughly linearly with "number of connections to a single dest port" * cpu load rises more than linearly with "number of dest ports" makes me think that the problem is in libalias... investigations are ongoing - any ideas / advice would be great as i'm not an expert. i'll let you know how it goes tariq intY has automatically scanned this email with Sophos Anti-Virus (www.inty.net) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message