[quagga-dev 4751] Re: Quagga OSPF and PPP Server

Paul Jakma paul at clubi.ie
Fri May 4 17:40:46 BST 2007


On Fri, 4 May 2007, Hai Wang (Íôº£) wrote:

> Hello Adrew,

>      Thank u for the help, your suggestion did fix all error
> messages, but when we managed to create more than 2000 PPP sessions,
> ospfd deamon had taken 95 % CPU even after all sessions were
> established and disconnected for very long time /forever, any
> thoughts?

There's a list walk within a list walk, of all addresses compared 
against all ospf_interfaces, in ospfd.c, see e.g. Sun bugid 5091634, 
which should be visible via:

   http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=5091634

but isn't (that might fix itself soonish). The description is:

--------------------------------------------------------------------------
ospfd, when receiving address add evetns from zebra (eg at startup), 
if it should consider whether to enable OSPF on that address, calls
ospf_if_is_configured to check whether an ospf_interface (oi)already 
exists. ospf_if_is_configured walks the entire list of existing oi's. 
On a machine with a lot of OSPF enabled interfaces (eg 2k), this 
results in the following profile:

                 0.00    0.00      50/13927082     ospf_nexthop_calculation [309]
                99.55   97.26 13927032/13927082     ospf_network_run [4]
[7]     60.5   99.55   97.26 13927082         ospf_if_is_configured [7]
                97.26    0.00 535666323/538638332     memcmp [9]

ospfd essentially is unuseable. The behaviour is approx O(n**1.88), 
or to be precise O(n**2/2+n/2), i think. I guess it would start 
becoming a nuisance for n > 50, and problematic for n > 100.

It would be nice to fix this at some stage. (not entirely 
stragihforward as the index can be either by the local or remote 
address if the interface is PtP).
-------------------------------------------------------------------------

regards,
-- 
Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
Fortune:
You will always find something in the last place you look.


More information about the Quagga-dev mailing list