OSPF performance/SPF calculations

Ondrej Zajicek santiago at crfreenet.org
Fri Apr 23 10:32:06 CEST 2010


On Wed, Apr 21, 2010 at 10:04:06PM +0200, Joakim Tjernlund wrote:
> Ondrej Zajicek <santiago at crfreenet.org> wrote on 2010/04/21 20:15:07:
> > On Wed, Apr 21, 2010 at 09:41:47AM +0200, Joakim Tjernlund wrote:
> > > I am using Quagga ATM but I had a quick look at BIRD and I got a few
> > > observations.
> >
> > Hello. Thank you for your tips and notes.
> >
> > > The LSA/checksum code seem very inefficient.
> > > LSAs are built allocating/reallocing bits
> > > of memory. This is slow and will case memory fragmentation.
> >
> > You mean lsab_alloc() in originate_rt_lsa_body()?
> > This allocation is just a sequential allocation in a persistent memory buffer,
> > therefore it is very efficient (in most cases just increase of lsab_used counter)
> > and there si no memory fragmentation (all is done inside a persistent memory buffer).
> 
> Yes, you do realloc on small amounts of memory. Also, receives LSAs
> seems to be impl. differently so you need handle these somewhat
> differently.

realloc() is used only for a persistent buffer to grow it sufficiently
large. So it is called only small number of times during the run of
the program and not in subsequent LSA originations. Therefore it is
not an issue.

> > The development state of Quagga is sad. Do you implement it in a different
> > way than in BIRD? I wonder whether there is any other possible way to get
> > next hop address for unnumbered ptp links than from source address
> > of HELLO packet.
> 
> Yep, now it gets tricky. It took me quite some time to figure out what to
> do. The secret is that you never use search for the interface using IP addresses
> in the LSA's.

That we never done for PTP ifaces.

> Instead you record what interface created what entry in in your
> own Router LSA. Based on the position of on entry in your own router
> LSA you can lookup the interface that created that entry. Once
> you know the interface, the reset is easy.

Yes, i got the idea. Our algorithm (for PTP) is to search for a ptp
iface with a full neighbor with given Router ID and choose the cheapest
one. This would lead to the same results as your idea, but a slightly
less efficient, but probably not important unless you have a hundreds
of PTP ifaces on a router.

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20100423/43a3be88/attachment-0001.asc>


More information about the Bird-users mailing list