From owner-freebsd-performance@FreeBSD.ORG Wed Feb 27 08:34:16 2008 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47278106566B for ; Wed, 27 Feb 2008 08:34:16 +0000 (UTC) (envelope-from vadim_nuclight@mail.ru) Received: from mx4.mail.ru (fallback.mail.ru [194.67.57.14]) by mx1.freebsd.org (Postfix) with ESMTP id 033E813C45A for ; Wed, 27 Feb 2008 08:34:15 +0000 (UTC) (envelope-from vadim_nuclight@mail.ru) Received: from mx30.mail.ru (mx30.mail.ru [194.67.23.238]) by mx4.mail.ru (mPOP.Fallback_MX) with ESMTP id 8D1B2AB7C0E for ; Wed, 27 Feb 2008 11:04:21 +0300 (MSK) Received: from [78.140.3.71] (port=63269 helo=nuclight.avtf.net) by mx30.mail.ru with esmtp id 1JUHGv-000D4A-00; Wed, 27 Feb 2008 11:04:13 +0300 To: "Niki Denev" References: <2e77fc10802212218k6acc7850m746a6c3d61c36937@mail.gmail.com> Message-ID: Date: Wed, 27 Feb 2008 14:04:10 +0600 From: "Vadim Goncharov" Organization: AVTF TPU Hostel Content-Type: text/plain; format=flowed; delsp=yes; charset=koi8-r MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <2e77fc10802212218k6acc7850m746a6c3d61c36937@mail.gmail.com> User-Agent: Opera M2/7.54 (Win32, build 3865) Cc: freebsd-performance@freebsd.org Subject: Re: interface aliases - not so curious X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2008 08:34:16 -0000 22.02.08 @ 12:18 Niki Denev wrote: > On Thu, Feb 21, 2008 at 2:18 PM, Vadim Goncharov > wrote: >> Hi! >> >> After looking at humorous quoting about a man trying to ban unused >> addresses in >> his network by putting 65535 ifcong_XXX_aliasYYY lines to rc.conf, I >> decided to >> check this performance issue on a 6.2-RELEASE (GENERIC) and compare it >> with >> Linux. Below are results from two machines. >> >> First, I've found that both FreeBSD and Linux clearly use linked-list >> insertion >> to tail of queue, because time was growing as O(N^2). Then, Linux >> deleted it >> slowly at first, then faster (is it using LIFO?..). >> >> But Linux with iproute2 was 6 times faster on addition (FreeBSD did it >> ONE HOUR!), >> and even more faster on deletion. Why?.. [...skip...] > The hardware seems very different between the two cases. > Pentium D's are probably much slower than the new Xeons, and > have less cache. > Also, is your Pentium D machine really SMP or just HTT? I've shown dmesg output in my letter, SMP GENERIC kernel told both CPUs are activated. HTT is present in features, I didn't any tuning with the machine, so probably it is real SMP, I don't know :) Although this part is really curious rather than practical, we should think about another performance-related thing: as addresses are stored in linked list, what is overhead on multi-interface machine on EVERY inbound packet? Imagine an mpd PPPoE router with 2000 interfaces - every packet will cause lookup into this list in ip_input() - and ENTIRE list for every forwarded packet. If ipfw is enebled with ``me'' rules - EVERY such rule will cause such overhead, too. Should we turn an alias address list into Radix or hash, as it was with VLAN interfaces? -- WBR, Vadim Goncharov