From owner-freebsd-net@FreeBSD.ORG Mon Feb 13 15:13:51 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A181216A420 for ; Mon, 13 Feb 2006 15:13:51 +0000 (GMT) (envelope-from bedinelli@madhaus.cns.utoronto.ca) Received: from madhaus.cns.utoronto.ca (madhaus.cns.utoronto.ca [128.100.103.10]) by mx1.FreeBSD.org (Postfix) with SMTP id 2B69543D48 for ; Mon, 13 Feb 2006 15:13:50 +0000 (GMT) (envelope-from bedinelli@madhaus.cns.utoronto.ca) Received: (qmail 11316 invoked by uid 31014); 13 Feb 2006 15:13:50 -0000 Received: from [128.100.103.148] (HELO [128.100.103.148]) (128.100.103.148) by madhaus.cns.utoronto.ca (qpsmtpd/0.30) with ESMTP; Mon, 13 Feb 2006 10:13:50 -0500 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Marcos Bedinelli Date: Mon, 13 Feb 2006 10:13:48 -0500 To: dima <_pppp@mail.ru> X-Mailer: Apple Mail (2.623) Cc: freebsd-net@freebsd.org Subject: Re: Network performance in a dual CPU system X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 15:13:51 -0000 Hi, On 10-Feb-06, at 16:39, dima wrote: > The second CPU wouldn't help you for sure. There's only one [swi1: > net] kernel thread which deals with all the kernel traffic. The option > of per-CPU [swi: net] threads was discussed on freebsd-arch@ several > months ago, but it wouldn't be implemented soon. > So, the only hardware option is installing the fastest CPU possible. Ok, the statement above answers my first question clearly and concisely (although I must confess I am a bit confused after reading Robert Watson's message). > There are several software (FreeBSD specific) options though: > 1. You should surely try polling(4). 50kpps mean 50000 interrupts and > the same amount of context switches, which are quite expensive. > 2. FastForwarding. It's the most suitable for you. As I know, Quagga > inserts its dynamic routes to the system routing table. And > FastForwarding is aware of routing table and firewall rules. And the > most exciting: you can switch it on/off without reboot: > # sysctl net.inet.ip.fastforwarding=1 This morning a tried suggestion number 2. I had HOST-A running a ping session to HOST-B. Between hosts A and B there was the heavily loaded FreeBSD machine in question. As soon as I entered 'sysctl net.inet.ip.fastforwarding=1' the ping session died. Switching fastforwarding back to 0 resumed the session. It's very unfortunate we can't afford to have that machine down, even for a couple of minutes, during daytime. I guess I'll have to read more about polling and the net.inet.ip.fastforwarding option, before giving it another try (probably around 3 a.m.) Thanks for your reply. Regards, -- Marcos