From 6a0e9078d4cda09f48c65fda8ef5cbafd23481d2 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Fri, 30 Apr 2021 16:30:30 -0700 Subject: [PATCH] [docker-orchagent]: Increase ndppd kernel poll interval (#7456) Why I did it ndppd by default reads /proc/net/ipv6_route ever 30 seconds. Since T1s advertise so many routes to ToRs, this file is extremely large, and reading it causes ndppd's CPU usage to spike every 30 seconds How I did it Increase the delay for reading this file to the maximum possible value (max integer value), which will result in CPU spikes every ~24 days instead of every 30 seconds How to verify it Start ndppd with the new config file, confirm that no CPU spikes are seen except at startup Signed-off-by: Lawrence Lee --- dockers/docker-orchagent/ndppd.conf.j2 | 2 +- src/sonic-config-engine/tests/sample_output/py2/ndppd.conf | 1 + src/sonic-config-engine/tests/sample_output/py3/ndppd.conf | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dockers/docker-orchagent/ndppd.conf.j2 b/dockers/docker-orchagent/ndppd.conf.j2 index bc375f3c49..dbb7073468 100644 --- a/dockers/docker-orchagent/ndppd.conf.j2 +++ b/dockers/docker-orchagent/ndppd.conf.j2 @@ -21,7 +21,7 @@ {% set _x = proxy_interfaces[intf].append(prefix) %} {% endif %} {% endfor -%} - +route-ttl 2147483647 {% for intf, prefix_list in proxy_interfaces.items() %} {% if prefix_list %} diff --git a/src/sonic-config-engine/tests/sample_output/py2/ndppd.conf b/src/sonic-config-engine/tests/sample_output/py2/ndppd.conf index 71ff1dfaf9..edae81fffd 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/ndppd.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/ndppd.conf @@ -4,6 +4,7 @@ # # Config file for ndppd, the NDP Proxy Daemon # See man page for ndppd.conf.5 for descriptions of all available options +route-ttl 2147483647 proxy Vlan1000 { rule fc02:1000::/64 { diff --git a/src/sonic-config-engine/tests/sample_output/py3/ndppd.conf b/src/sonic-config-engine/tests/sample_output/py3/ndppd.conf index 28a239006d..66117155cd 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/ndppd.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/ndppd.conf @@ -4,6 +4,7 @@ # # Config file for ndppd, the NDP Proxy Daemon # See man page for ndppd.conf.5 for descriptions of all available options +route-ttl 2147483647 proxy Vlan1000 { rule fc01:1000::/64 {