interface aliases - not so curious
vadim_nuclight at mail.ru
Wed Feb 27 08:34:16 UTC 2008
22.02.08 @ 12:18 Niki Denev wrote:
> On Thu, Feb 21, 2008 at 2:18 PM, Vadim Goncharov
> <vadim_nuclight at mail.ru> wrote:
>> 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
>> Linux. Below are results from two machines.
>> First, I've found that both FreeBSD and Linux clearly use linked-list
>> 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?..
> 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
WBR, Vadim Goncharov
More information about the freebsd-performance