Skip to contentSkip to conversation

keeping ifindex in 16bits or does it have to be sparse?

DISCUSSION Jeremy Jackson 3 participants 3 messages Mar 31, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The question came up when profiling Quagga... a performance issue occurs because it's iterating over a linked list of interface structures... and this person is using 2000 interfaces for ADSL PPPoE server. It's an interesting use case.

There are 2 options to make the interface lookup in quagga scale: array or hash. My first thought was array, but it seems that ifindex can get sparse, that is, the largest ifindex can be much bigger (eg 408589) the number of max number of interfaces.

So question to netdev, is it possible to reuse ifindex eventually, so it won't keep growing with interface add/delete, and are there (unnecessary) large jumps in the allocation sequence?

Signature · 5 lines
Jeremy Jackson
Coplanar Networks
(519)489-4903
http://www.coplanar.net
[email protected]
#1 lore raw
Quoted 5 lines · Jeremy Jackson

The question came up when profiling Quagga... a performance issue occurs because it's iterating over a linked list of interface structures... and this person is using 2000 interfaces for ADSL PPPoE server. It's an interesting use case.

Quoted 9 lines

There are 2 options to make the interface lookup in quagga scale: array or hash. My first thought was array, but it seems that ifindex can get sparse, that is, the largest ifindex can be much bigger (eg 408589) the number of max number of interfaces.

So question to netdev, is it possible to reuse ifindex eventually, so it won't keep growing with interface add/delete, and are there (unnecessary) large jumps in the allocation sequence?

Please use a hash...I'm sure someone will have a use-case with more than 64k interfaces sometime soon.

Ben

Signature · 1 line
Ben Greear <[email protected]> Candela Technologies Inc  http://www.candelatech.com
#2 lore raw
In reply to Jeremy Jackson
Quoted 5 lines · On Tue, 31 Mar 2009 11:08:17 -0400 Jeremy Jackson <[email protected]> wrote:

The question came up when profiling Quagga... a performance issue occurs because it's iterating over a linked list of interface structures... and this person is using 2000 interfaces for ADSL PPPoE server. It's an interesting use case.

Quoted 9 lines

There are 2 options to make the interface lookup in quagga scale: array or hash. My first thought was array, but it seems that ifindex can get sparse, that is, the largest ifindex can be much bigger (eg 408589) the number of max number of interfaces.

So question to netdev, is it possible to reuse ifindex eventually, so it won't keep growing with interface add/delete, and are there (unnecessary) large jumps in the allocation sequence?

Hash the names as well, since quagga does a lot of lookup by name.