BGP memory usage

MegaZone (megazone@livingston.com)
Mon, 21 Apr 1997 18:30:22 -0700 (PDT)

Once upon a time Stephen Fisher shaped the electrons to say...
>If Livingston can do it in so little why does it take more on a Cisco?

Because their route storage code is poor.

>43746 network entries (131204/174972 paths) using 10327708 bytes of memory
>3932 BGP path attribute entries using 459600 bytes of memory
>Coming from three directions.
>
>You can't tell me that Cisco is stupid and uses extra memory for no
>reason.. :-)

Well, you said it, I didn't:

-----------------------------------------------------------------------------
This output shows the NLRI (route count) received from and sent to each peer.
There are currently have about 44,600 routes from each peer, a total of
~113,000 routes.

router135> show bgp peer packet
Open Keepalive Notification Update NLRI
Remote IP Up In/Out In/Out In/Out In/Out In/Out
--------------- -- ------------ ------------ ------------ ------------ ------
149.198.96.133 Up 3 190 0 13828 44639
4 190 3 10386 44629
149.198.96.131 Up 1 200 0 12462 44633
1 191 0 10766 44643
149.198.96.130 Up 3 189 0 10259 44643
3 188 1 0 0

-----------------------------------------------------------------------------

This output shows a summary of memory usage. This shows that the
system is using about 3.5MBytes that is destination specific, that
will tend not to grow no matter how many peers are added. Peer
specific use is 5.8MByte, since each peer is advertising the same
total # of routes, then this is roughly 2Mbyte per peer. Add another
peer giving the full routing table, and you will get another
2Mbytes... Not shown here is the routing table usage, which is
approximately 2MBytes for 45,000 destinations, destination specific
usage. (48 bytes per destination). This will not grow when a new peer
is added.

router135> show bgp mem
BGP is using a total of 9326032 bytes of memory for 44644 destinations:

Destination-specific use: 3481296 bytes
Peer-specific use: 5844736 bytes

-----------------------------------------------------------------------------
This output shows detailed BGP memory usage:

router135> show bgp mem verbose
Memory Type Total Nodes Memory Consumption
----------- ----------- ------------------
Radix Nodes 86446 2766272
(With Data) 44710
Peers 7 12880
Peer Data Buffers 3 24576
Prefixes 44645 714320
Paths 11868 761376
Path Advertisings 11868 189888
NLRIs 133923 4285536
NLRI Roots 11868 569664
Next Hops 4 192
Withdrawn Prefixes 1 16
Summarizations 0 0
Policy Lists 8 256
Policy Items 10 640
Autosum Work Queue 0 0
------------------
Total: 9325616

-MZ

--
Livingston Enterprises - Chair, Department of Interstitial Affairs
Phone: 800-458-9966 510-737-2100 FAX: 510-737-2110 megazone@livingston.com
For support requests: support@livingston.com  <http://www.livingston.com/> 
Snail mail: 4464 Willow Road, Pleasanton, CA 94588