[Xorp-hackers] FEA performance improvements: only 'pull' active interfaces.

Ben Greear greearb at candelatech.com
Wed Mar 26 09:23:01 PDT 2008


Bruce M. Simpson wrote:
> Ben Greear wrote:
>> Pavlin Radoslavov wrote:
>>  
>>> The problem with this solution is that it will work only for Netlink
>>> on Linux. The (majoriyty of the) other mechanisms for obtaining the
>>> network interface information (getifaddrs(3), ioctl(2), syssctl(3),
>>> etc) don't allow the granularity for asking only the information for
>>> a specific interface.
>> Yes, this may only be useful for my scenario where I'm using a small
>> number of interfaces per xorp instance, with large numbers of total 
>> interfaces.
>> Only linux can virtualize routing tables, as far as I know, so this 
>> performance
>> gain is only really important on Linux.
>
> Unfortunately as Pavlin points out getifaddrs() retrieves information 
> for *all* interfaces configured in the system. It gets expensive for 
> large N because it doesn't build a tree, it just uses a linked list.
>
> FreeBSD is about to see some virtualization support in this area, so a 
> cross platform solution needs to be carefully considered.
Well, if the base OS doesn't support the needed API, then there isn't 
much you can do.  Linux
does seem to support ways to optimize things...so I made the attempt.  
Soon, there will be a way
to filter the Netlink routing-table update events as well, so I'll be 
able to optimize things even
more for Linux.

I don't think any of my changes would make BSD any less efficient, at least.

Thanks,
Ben


-- 
Ben Greear <greearb at candelatech.com> 
Candela Technologies Inc  http://www.candelatech.com




More information about the Xorp-hackers mailing list