Hi all,
Seems we have a trouble with BGP consumes a lot of memory in VM vyos.
When all peerings were bringed up, it was like this , a bit more than 400M of memory
admin@nn-lns-3-1:~$ top
top - 03:42:33 up 1:27, 3 users, load average: 0.07, 0.04, 0.01
Tasks: 145 total, 1 running, 144 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.3 us, 0.2 sy, 0.0 ni, 99.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 16019.9 total, 13710.6 free, 2005.3 used, 303.9 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 13595.3 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1065 frr 20 0 406852 235740 6508 S 6.6 1.4 5:49.33 bgpd
1 root 20 0 165156 10572 7792 S 0.0 0.1 0:03.93 systemd
Peering looks like in output below
admin@nn-lns-3-1:~$ sho bgp summary
IPv4 Unicast Summary (VRF default):
BGP router identifier 10.228.134.1, local AS number 64826 vrf-id 0
BGP table version 1034
RIB entries 1557, using 280 KiB of memory
Peers 5, using 3617 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc
10.228.134.32 4 64516 1791 1758 0 0 0 01:27:42 53 4 SC-x-1 vrf
10.228.134.34 4 64516 1792 1758 0 0 0 01:27:42 53 4 SC-x-2 vrf
10.228.134.36 4 64516 1778 1758 0 0 0 01:27:42 202 4 SC-x-1 vrf
10.228.134.38 4 64516 1778 1758 0 0 0 01:27:42 202 4 SC-x-2 vrf
10.228.134.102 4 64826 317 316 0 0 0 01:16:32 256 837 ipv4
Total number of neighbors 5
IPv4 VPN Summary (VRF default):
BGP router identifier 10.228.134.1, local AS number 64826 vrf-id 0
BGP table version 0
RIB entries 1949, using 350 KiB of memory
Peers 3, using 2170 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc
10.5.72.1 4 39374 564924 313205 0 0 0 01:27:39 34687 34689 BBR1 vpnv4
10.5.72.2 4 39374 560598 313205 0 0 0 01:27:39 34687 34689 BBR2 vpnv4
10.228.134.101 4 64826 357407 358698 0 0 0 01:16:32 34689 34686 vLNS-4-1
Total number of neighbors 3
IPv4 Labeled Unicast Summary (VRF default):
BGP router identifier 10.228.134.1, local AS number 64826 vrf-id 0
BGP table version 3
RIB entries 5, using 920 bytes of memory
Peers 2, using 1447 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc
10.228.134.40 4 39374 406 91 0 0 0 01:27:42 581 4 BBR1 ipv4 LU
10.228.134.42 4 39374 405 91 0 0 0 01:27:42 581 4 BBR2 ipv4 LU
Total number of neighbors 2
On July 29th bgp have already consumed 1.8 Gigs of memory
admin@nn-lns-3-1:~$ top
top - 00:03:00 up 2 days, 21:47, 1 user, load average: 0.10, 0.09, 0.02
Tasks: 147 total, 1 running, 146 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.2 us, 0.3 sy, 0.0 ni, 99.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 16019.9 total, 12013.7 free, 3665.2 used, 340.9 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 11917.0 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1065 frr 20 0 2109440 1.8g 6540 S 5.6 11.8 263:17.20 bgpd
1 root 20 0 165156 10576 7792 S 0.0 0.1 0:05.11 systemd
And today, 2022-08-02, 00:10 om MSK (GMT+3) Timezone we can see that bgp consumes 4 Gigs of memory
admin@nn-vlns-3-1:~$ top
top - 00:00:42 up 6 days, 21:45, 1 user, load average: 0.04, 0.03, 0.00
Tasks: 144 total, 1 running, 143 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.3 us, 0.2 sy, 0.0 ni, 99.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 16019.9 total, 7912.9 free, 7402.8 used, 704.2 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 8163.1 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1065 frr 20 0 4340528 4.0g 8572 S 6.3 25.4 606:01.27 bgpd
1013 root 20 0 8368 3560 2304 S 0.3 0.0 6:43.08 watchfrr
Peering hasn`t dramatically changed:
Today:
admin@nn-vlns-3-1:~$ sho bgp summary
IPv4 Unicast Summary (VRF default):
BGP router identifier 10.228.134.1, local AS number 64826 vrf-id 0
BGP table version 2239
RIB entries 1560, using 280 KiB of memory
Peers 5, using 3617 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc
10.228.134.32 4 64516 198119 198923 0 0 0 6d21h45m 53 4 SC-x-1 vrf AAA
10.228.134.34 4 64516 198107 198923 0 0 0 6d21h45m 53 4 SC-x-2 vrf AAA
10.228.134.36 4 64516 198118 198923 0 0 0 6d21h45m 202 4 SC-x-1 vrf T2-LNS
10.228.134.38 4 64516 198103 198923 0 0 0 6d21h45m 202 4 SC-x-2 vrf T2-LNS
10.228.134.102 4 64826 10466 10898 0 0 0 6d21h34m 256 839 ipv4 vLNS-4-1 AAA/T2
Total number of neighbors 5
IPv4 VPN Summary (VRF default):
BGP router identifier 10.228.134.1, local AS number 64826 vrf-id 0
BGP table version 0
RIB entries 1965, using 353 KiB of memory
Peers 3, using 2170 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc
10.5.72.1 4 39374 55349635 31842495 0 0 0 6d21h45m 35683 35692 BBR1 vpnv4
10.5.72.2 4 39374 55169017 31842495 0 0 0 6d21h45m 35683 35692 BBR2 vpnv4
10.228.134.101 4 64826 41267796 41476345 0 0 0 6d21h34m 35687 35690 vLNS-4-1 VPNV4
Total number of neighbors 3
IPv4 Labeled Unicast Summary (VRF default):
BGP router identifier 10.228.134.1, local AS number 64826 vrf-id 0
BGP table version 3
RIB entries 5, using 920 bytes of memory
Peers 2, using 1447 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc
10.228.134.40 4 39374 13565 9949 0 0 0 6d21h45m 583 4 BBR1 ipv4 LU
10.228.134.42 4 39374 13612 9949 0 0 0 6d21h45m 583 4 BBR2 ipv4 LU
Total number of neighbors 2
admin@nn-vlns-3-1:~$
version is 1.4
admin@nn-vlns-3-1:~$ sho version
Version: VyOS 1.4-rolling-202206071305
Release train: sagitta
Built by: alexander.serkin@gmail.com
Built on: Tue 07 Jun 2022 13:05 UTC
Build UUID: 6b0e27db-4f48-4d84-8ccd-fcd7d50d8c57
Build commit ID: 06a1dc8ccc7a39
Architecture: x86_64
Boot via: installed image
System type: KVM guest
Hardware vendor: Red Hat
Hardware model: KVM
Hardware S/N:
Hardware UUID: 109949e4-96b7-44ee-8c96-a111bb36bd23
Copyright: VyOS maintainers and contributors
admin@nn-vlns-3-1:~$
Does it sounds like a memory leak ?