[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: interface aliases - not so curious



22.02.08 @ 12:18 Niki Denev wrote:

On Thu, Feb 21, 2008 at 2:18 PM, Vadim Goncharov <vadim_nuclight_(_at_)_mail_(_dot_)_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
_______________________________________________
freebsd-performance_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "freebsd-performance-unsubscribe_(_at_)_freebsd_(_dot_)_org"


Visit your host, monkey.org