Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: generate json by default for [l]communities and aspaths
The show bgp ipv4 detail json command takes a lot of memory, and on Linux, when reading a full route, the resulting VM size of the bgp daemon has increased from 10.2 GB to 19.2 GB (the measure has been done with the pathch of the below link. The hypothesis is that the memory management is culprit: on Linux, pages are allocated to host memory blocks. When those memory blocks are no more used, any empty page should be made available. If the page is not freed, this probably means that some memory blocks have not been freed. The troubleshooting shows that some data of bgp entries store the json format when the usage is requested. That would imply that for a given page, some memory blocks will remain after the show, and others not. In order to separate both usages on a shared page, do choose to allocate the json output of bgp aspath, bgp communities, and bgp large communities at startup. The number of additional allocations done at startup is measured: - 130472 aspaths - 18471 communities - 1308 large communities The memory measurement is given for information and does not show any significative improvement since only the initial VM size has changed frmo 1663832 KB to 2137220 KB. > root@dut-sureau-nianticvf:~# ps -aux | grep bgpd > root 7702 83.3 14.5 1663832 1485640 ? Ssl 08:14 1:56 /usr/bin/bgpd -A 127.0.0.1 -M snmp -M rpki -M bmp > root@dut-sureau-nianticvf:~# time vtysh -c "show bgp ipv4 json detail" > /tmp/showbgpipv4detailjson.txt > > real 0m30.286s > user 0m2.796s > sys 0m5.565s > root@dut-sureau-nianticvf:~# ps -aux | grep bgpd > root 7702 75.7 19.2 2137220 1959064 ? Ssl 08:14 2:23 /usr/bin/bgpd -A 127.0.0.1 -M snmp -M rpki -M bmp Link: FRRouting#16498 Signed-off-by: Philippe Guibert <[email protected]>
- Loading branch information