Date: Wed, 27 Feb 2008 14:04:10 +0600 From: "Vadim Goncharov" <vadim_nuclight@mail.ru> To: "Niki Denev" <nike_d@cytexbg.com> Cc: freebsd-performance@freebsd.org Subject: Re: interface aliases - not so curious Message-ID: <opt66bc8pq17d6mn@nuclight.avtf.net> In-Reply-To: <2e77fc10802212218k6acc7850m746a6c3d61c36937@mail.gmail.com> References: <slrnfrqqvr.1hre.vadim_nuclight@hostel.avtf.net> <2e77fc10802212218k6acc7850m746a6c3d61c36937@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
22.02.08 @ 12:18 Niki Denev wrote: > On Thu, Feb 21, 2008 at 2:18 PM, Vadim Goncharov > <vadim_nuclight@mail.ru> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?opt66bc8pq17d6mn>