Skip to content

Commit

Permalink
[bgp]: Tuning zebra nexthop-group keep parameter (#21135)
Browse files Browse the repository at this point in the history
Why I did it
Setting the nexthop-group keep parameter to 1. This will instruct zebra not to save nexthop group for more than 1 second after removal. Without this zebra will keep nexthop group in the system for 180 seconds.
In scaled scenarios when this parameter is not set it resulted in the queue growing so big and crashing zebra due to OOM when there is test on link flapping.

How I did it
Update the zebra template and initialize nexthop-group keep as 1.

How to verify it
Running the scale test with link flapping and ensure no memory increase in zebra.
  • Loading branch information
dgsudharsan authored Dec 16, 2024
1 parent bce1619 commit 3eb0196
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions dockers/docker-fpm-frr/frr/zebra/zebra.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ no fpm use-next-hop-groups
!
fpm address 127.0.0.1
{% endblock fpm %}
zebra nexthop-group keep 1
!
{% include "common/daemons.common.conf.j2" %}
!
Expand Down
1 change: 1 addition & 0 deletions platform/vs/docker-sonic-vs/frr/zebra.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
no fpm use-next-hop-groups

fpm address 127.0.0.1
zebra nexthop-group keep 1

1 change: 1 addition & 0 deletions src/sonic-bgpcfgd/tests/data/sonic-cfggen/zebra/zebra.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
no fpm use-next-hop-groups
!
fpm address 127.0.0.1
zebra nexthop-group keep 1
!
! template: common/daemons.common.conf.j2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
no fpm use-next-hop-groups
!
fpm address 127.0.0.1
zebra nexthop-group keep 1
!
! template: common/daemons.common.conf.j2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
no fpm use-next-hop-groups
!
fpm address 127.0.0.1
zebra nexthop-group keep 1
!
! template: common/daemons.common.conf.j2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
no fpm use-next-hop-groups
!
fpm address 127.0.0.1
zebra nexthop-group keep 1
!
! template: common/daemons.common.conf.j2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
no fpm use-next-hop-groups
!
fpm address 127.0.0.1
zebra nexthop-group keep 1
!
! template: common/daemons.common.conf.j2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
no fpm use-next-hop-groups
!
fpm address 127.0.0.1
zebra nexthop-group keep 1
!
! template: common/daemons.common.conf.j2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
no fpm use-next-hop-groups
!
fpm address 127.0.0.1
zebra nexthop-group keep 1
!
! template: common/daemons.common.conf.j2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
no fpm use-next-hop-groups
!
fpm address 127.0.0.1
zebra nexthop-group keep 1
!
! template: common/daemons.common.conf.j2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
no fpm use-next-hop-groups
!
fpm address 127.0.0.1
zebra nexthop-group keep 1
!
! template: common/daemons.common.conf.j2
!
Expand Down

0 comments on commit 3eb0196

Please sign in to comment.