Skip site navigation (1)Skip section navigation (2)
Date:      14 Jun 1996 16:14:06 -0400
From:      bill@twwells.com (T. William Wells)
To:        freebsd-questions@freebsd.org
Subject:   Re: performance effects of many interface addresses?
Message-ID:  <4psh6e$ba3@twwells.com>
References:  <4pqeud$ohs@twwells.com> <7122.834716598@palmer.demon.co.uk> <9606141410.AA17238@halloran-eldar.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <9606141410.AA17238@halloran-eldar.lcs.mit.edu>,
Garrett Wollman  <wollman@lcs.mit.edu> wrote:
: 2) For every packet received, the system much search (potentially) the
: entire address list (potentially twice) to determine whether it should
: accept or forward/drop the packet.

Ignoring the packet filter and the firewall code....

There is a loop that looks through in_ifaddr in ipintr.  It takes
about 7 tests/address. Even with caching, each of them is going
to require at least one memory access, and at 60ns/access, that's
420ns. Assuming random access to the list, 250 addresses require
125 accesses, or 52 microseconds, conservatively and on average,
to search that list. A 1500 byte ethernet packet takes 1.2
milliseconds, so I'm spending about 4% of a packet time in that
loop alone. Alternately, as I'm doing perhaps 80 packets/second,
that's .4% of the time the system is spending in that loop alone.

This isn't catastrophic but it isn't especially wonderful, either.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4psh6e$ba3>