[quagga-dev 5257] Re: BGP memory utilization

paul at clubi.ie paul at clubi.ie
Thu Feb 7 17:19:23 GMT 2008

On Tue, 5 Feb 2008, Scher, Dave wrote:

> linearly increases from approximately 0 at start to x% percent 
> utilization when bgpd completes the route exchange with its two 
> peers.  However, utilization remains at x% for the remainder of the 
> trial where the output of show ip bgp does not display any routes. 
> Is this a protocol feature (perhaps flap dampening) that will keep 
> the routes as stale in the adj-rib-in data structs but remove them 
> from the global RIB?

No, it's a feature of the memory allocator in your libc (and many 
(most?) others). They rarely release memory, even if they can. 
Further, cause how heap allocation works, even if you have hundreds 
of MB free your allocator might not be able to release it because of 
one tiny bit of memory that's in use.

Fortunately, this unused memory need not be a burden: If you're 
running a /real/ bgpd then memory that is freed often will be quickly 
requested back (e.g. if a session goes down, it likely will come back 
up). Finally, if the memory remains unused and you have swap it can 
be pushed out to there.

If you're really worried about this, you'd need to tweak your OSes 
allocator to not use heap allocations. Consult documentation. In 
general you don't need to worry about this, really.

Type 'show memory' in the bgpd telnet vty to see what bgpd thinks it 
has allocated. That /will/ show the memory being consumed and then 
released in your test.

If 'show memory' does /not/ show memory objects being released, then 
that'd be a leak - and a problem.

> Also I am trying to verify that bgpd does NOT support Graceful 
> Restart is this true?

BGPd /does/ support GR. I.e. it supports all the protocol stuff, so 
if another router tries a graceful-restart Quagga bgpd should 
accomodate that.

However, bgpd can not itself do a graceful-restart at this time.

Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
No excellent soul is exempt from a mixture of madness.
  		-- Aristotle

More information about the Quagga-dev mailing list