[quagga-users 12513] memory change requirements or leak ?
Mike Tancsa
mike at sentex.net
Fri Oct 14 14:16:17 IST 2011
I noticed moving from .17 to .20, bgpd is all of a sudden using a lot more memory for the same peers and routes. Previously the daemon would hover around 400MB, now its pushing 900 ?
In the logs I see
Oct 14 04:43:59 bdr1 bgpd[1804]: calloc : can't allocate memory for `' size 72: Cannot allocate memory
Oct 14 04:43:59 bdr1 bgpd[1804]: Memory utilization in module LIB:
Oct 14 04:43:59 bdr1 bgpd[1804]: Temporary memory : 5
Oct 14 04:43:59 bdr1 bgpd[1804]: String vector : 14524
Oct 14 04:43:59 bdr1 bgpd[1804]: Vector : 7221
Oct 14 04:43:59 bdr1 bgpd[1804]: Vector index : 7221
Oct 14 04:43:59 bdr1 bgpd[1804]: Link List : 27
Oct 14 04:43:59 bdr1 bgpd[1804]: Link Node : 72
Oct 14 04:43:59 bdr1 bgpd[1804]: Thread : 343
Oct 14 04:43:59 bdr1 bgpd[1804]: Thread master : 1
Oct 14 04:43:59 bdr1 bgpd[1804]: Thread stats : 18
Oct 14 04:43:59 bdr1 bgpd[1804]: Thread function name : 175
Oct 14 04:43:59 bdr1 bgpd[1804]: Interface : 16
Oct 14 04:43:59 bdr1 bgpd[1804]: Connected : 18
Oct 14 04:43:59 bdr1 bgpd[1804]: Buffer : 2
Oct 14 04:43:59 bdr1 bgpd[1804]: Stream : 49
Oct 14 04:43:59 bdr1 bgpd[1804]: Stream data : 49
Oct 14 04:43:59 bdr1 bgpd[1804]: Stream FIFO : 22
Oct 14 04:43:59 bdr1 bgpd[1804]: Prefix : 27
Oct 14 04:43:59 bdr1 bgpd[1804]: Hash : 183
Oct 14 04:43:59 bdr1 bgpd[1804]: Hash Bucket : 514777
Oct 14 04:43:59 bdr1 bgpd[1804]: Hash Index : 183
Oct 14 04:43:59 bdr1 bgpd[1804]: Prefix List : 15
Oct 14 04:43:59 bdr1 bgpd[1804]: Prefix List Entry : 92
Oct 14 04:43:59 bdr1 bgpd[1804]: Prefix List Str : 15
Oct 14 04:43:59 bdr1 bgpd[1804]: Route map : 4
Oct 14 04:43:59 bdr1 bgpd[1804]: Route map name : 4
Oct 14 04:43:59 bdr1 bgpd[1804]: Route map index : 10
Oct 14 04:43:59 bdr1 bgpd[1804]: Route map rule : 17
Oct 14 04:43:59 bdr1 bgpd[1804]: Route map rule str : 17
Oct 14 04:43:59 bdr1 bgpd[1804]: Route map compiled : 15
Oct 14 04:43:59 bdr1 bgpd[1804]: Command desc : 7274
Oct 14 04:43:59 bdr1 bgpd[1804]: Socket union : 54
Oct 14 04:43:59 bdr1 bgpd[1804]: Logging : 1
Oct 14 04:43:59 bdr1 bgpd[1804]: Zclient : 2
Oct 14 04:43:59 bdr1 bgpd[1804]: Work queue : 2
Oct 14 04:43:59 bdr1 bgpd[1804]: Work queue name string : 2
Oct 14 04:43:59 bdr1 bgpd[1804]: Host config : 3
Oct 14 04:43:59 bdr1 bgpd[1804]: Memory utilization in module ZEBRA:
Oct 14 04:43:59 bdr1 bgpd[1804]: Nexthop : 12
Oct 14 04:43:59 bdr1 bgpd[1804]: Memory utilization in module RIP:
Oct 14 04:43:59 bdr1 bgpd[1804]: Memory utilization in module RIPNG:
Oct 14 04:43:59 bdr1 bgpd[1804]: Memory utilization in module OSPF:
Oct 14 04:43:59 bdr1 bgpd[1804]: Memory utilization in module OSPF6:
Oct 14 04:43:59 bdr1 bgpd[1804]: Memory utilization in module ISIS:
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP extra attributes : 36022252
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP aspath : 118930
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP aspath seg : 119039
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP aspath segment data : 119039
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP aspath str : 118930
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP table : 31
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP node : 698276
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP route : 1189351
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP ancillary route info : 815144
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP connected : 7
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP static : 3
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP adv attr : 671
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP adv : 12683
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP synchronise : 176
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP adj in : 374168
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP adj out : 4428246
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP AS list : 5
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP AS filter : 23
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP AS filter str : 23
Oct 14 04:43:59 bdr1 bgpd[1804]: community : 245
Oct 14 04:43:59 bdr1 bgpd[1804]: community val : 245
Oct 14 04:43:59 bdr1 bgpd[1804]: community str : 245
Oct 14 04:43:59 bdr1 bgpd[1804]: community-list handler : 1
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP nexthop : 12
Oct 14 04:43:59 bdr1 bgpd[1804]: BGP regexp : 23
Oct 14 04:43:59 bdr1 bgpd[1804]: No backtrace available on this platform.
Oct 14 04:43:59 bdr1 kernel: pid 1804 (bgpd), uid 101: exited on signal 6
On the restarted process, I see
# sh mem
Temporary memory : 3
String vector : 14526
Vector : 7222
Vector index : 7222
Link List : 28
Link Node : 73
Thread : 121035
Thread master : 1
Thread stats : 18
Thread function name : 18446
VTY : 2
VTY history : 2
Interface : 16
Connected : 18
Buffer : 3
Buffer data : 1
Stream : 49
Stream data : 49
Stream FIFO : 22
Prefix : 27
Hash : 183
Hash Bucket : 514026
Hash Index : 183
Prefix List : 15
Prefix List Entry : 92
Prefix List Str : 15
Route map : 4
Route map name : 4
Route map index : 10
Route map rule : 17
Route map rule str : 17
Route map compiled : 15
Command desc : 7274
Socket union : 54
Logging : 1
Zclient : 2
Work queue : 3
Work queue name string : 3
Host config : 3
-----------------------------
Nexthop : 12
-----------------------------
BGP instance : 1
BGP listen socket details : 2
BGP peer : 22
BGP peer hostname : 22
Peer group : 3
Peer description : 12
BGP attribute : 394875
BGP extra attributes : 7643980
BGP aspath : 118890
BGP aspath seg : 118999
BGP aspath segment data : 118999
BGP aspath str : 118890
-----------------------------
BGP table : 31
BGP node : 699054
BGP route : 1190751
BGP ancillary route info : 816127
BGP connected : 7
BGP static : 3
BGP synchronise : 176
BGP adj in : 374585
BGP adj out : 4433196
-----------------------------
BGP AS list : 5
BGP AS filter : 23
BGP AS filter str : 23
-----------------------------
community : 245
community val : 245
community str : 245
-----------------------------
community-list handler : 1
-----------------------------
BGP nexthop : 12
BGP regexp : 23
waiting 30 seconds and diffing the output, I see
< Hash Bucket : 514026
---
> Hash Bucket : 514038
50,51c49,50
< BGP attribute : 394875
< BGP extra attributes : 7643980
---
> BGP attribute : 394886
> BGP extra attributes : 7645943
58,60c57,59
< BGP node : 699054
< BGP route : 1190751
< BGP ancillary route info : 816127
---
> BGP node : 699066
> BGP route : 1190755
> BGP ancillary route info : 816126
62a62,63
> BGP adv attr : 1
> BGP adv : 1
64,65c65,66
< BGP adj in : 374585
< BGP adj out : 4433196
---
> BGP adj in : 374590
> BGP adj out : 4433256
This is a freebsd box
---Mike
--
-------------------
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, mike at sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada http://www.tancsa.com/
More information about the Quagga-users
mailing list