![]() Add a default limit to the InQ for messages off the bgp peer socket. Make the limit configurable via cli. Adding in this limit causes the messages to be retained in the tcp socket and allow for tcp back pressure and congestion control to kick in. Before this change, we allow the InQ to grow indefinitely just taking messages off the socket and adding them to the fifo queue, never letting the kernel know we need to slow down. We were seeing under high loads of messages and large perf-heavy routemaps (regex matching) this queue would cause a memory spike and BGP would get OOM killed. Modifying this leaves the messages in the socket and distributes that load where it should be in the socket buffers on both send/recv while we handle the mesages. Also, changes were made to allow the ringbuffer to hold messages and continue to be filled by the IO pthread while we wait for the Main pthread to handle the work on the InQ. Memory spike seen with large numbers of routes flapping and route-maps with dozens of regex matching: ``` Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 516 KiB Used small blocks: 0 bytes Used ordinary blocks: 160 MiB Free small blocks: 3680 bytes Free ordinary blocks: > 2GB Ordinary blocks: 121244 Small blocks: 83 Holding blocks: 1 ``` With most of it being held by the inQ (seen from the stream datastructure info here): ``` Type : Current# Size Total Max# MaxBytes ... ... Stream : 115543 variable 26963208 15970740 3571708768 ``` With this change that memory is capped and load is left in the sockets: RECV Side: ``` State Recv-Q Send-Q Local Address:Port Peer Address:Port Process ESTAB 265350 0 [fe80::4080:30ff:feb0:cee3]%veth1:36950 [fe80::4c14:9cff:fe1d:5bfd]:179 users:(("bgpd",pid=1393334,fd=26)) skmem:(r403688,rb425984,t0,tb425984,f1816,w0,o0,bl0,d61) ``` SEND Side: ``` State Recv-Q Send-Q Local Address:Port Peer Address:Port Process ESTAB 0 1275012 [fe80::4c14:9cff:fe1d:5bfd]%veth1:179 [fe80::4080:30ff:feb0:cee3]:36950 users:(("bgpd",pid=1393443,fd=27)) skmem:(r0,rb131072,t0,tb1453568,f1916,w1300612,o0,bl0,d0) ``` Signed-off-by: Stephen Worley <sworley@nvidia.com> |
||
---|---|---|
.github | ||
alpine | ||
babeld | ||
bfdd | ||
bgpd | ||
debian | ||
doc | ||
docker | ||
eigrpd | ||
fpm | ||
gdb | ||
grpc | ||
include | ||
isisd | ||
ldpd | ||
lib | ||
m4 | ||
mlag | ||
nhrpd | ||
ospf6d | ||
ospfclient | ||
ospfd | ||
pathd | ||
pbrd | ||
pceplib | ||
pimd | ||
pkgsrc | ||
python | ||
qpb | ||
redhat | ||
ripd | ||
ripngd | ||
sharpd | ||
snapcraft | ||
staticd | ||
tests | ||
tools | ||
vrrpd | ||
vtysh | ||
watchfrr | ||
yang | ||
zebra | ||
.clang-format | ||
.dir-locals.el | ||
.dockerignore | ||
.git-blame-ignore-revs | ||
.gitignore | ||
.pylintrc | ||
.travis.yml | ||
bootstrap.sh | ||
buildtest.sh | ||
config.version.in | ||
configure.ac | ||
COPYING | ||
COPYING-LGPLv2.1 | ||
Makefile.am | ||
README.md | ||
stamp-h.in | ||
version.h |
FRRouting
FRR is free software that implements and manages various IPv4 and IPv6 routing protocols. It runs on nearly all distributions of Linux and BSD and supports all modern CPU architectures.
FRR currently supports the following protocols:
- BGP
- OSPFv2
- OSPFv3
- RIPv1
- RIPv2
- RIPng
- IS-IS
- PIM-SM/MSDP
- LDP
- BFD
- Babel
- PBR
- OpenFabric
- VRRP
- EIGRP (alpha)
- NHRP (alpha)
Installation & Use
For source tarballs, see the releases page.
For Debian and its derivatives, use the APT repository at https://deb.frrouting.org/.
Instructions on building and installing from source for supported platforms may be found in the developer docs.
Once installed, please refer to the user guide for instructions on use.
Community
The FRRouting email list server is located here and offers the following public lists:
Topic | List |
---|---|
Development | dev@lists.frrouting.org |
Users & Operators | frog@lists.frrouting.org |
Announcements | announce@lists.frrouting.org |
For chat, we currently use Slack. You can join by clicking the "Slack" link under the Participate section of our website.
Contributing
FRR maintains developer's documentation which contains the project workflow and expectations for contributors. Some technical documentation on project internals is also available.
We welcome and appreciate all contributions, no matter how small!
Security
To report security issues, please use our security mailing list:
security [at] lists.frrouting.org