Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

fix: apply large ipv4 neigh GC settings to nodes of all sizes #2732

Merged
merged 1 commit into from
Feb 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions parts/k8s/cloud-init/artifacts/kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ ExecStartPre=/sbin/sysctl -w net.ipv4.tcp_max_syn_backlog=16384
ExecStartPre=/sbin/sysctl -w net.core.message_cost=40
ExecStartPre=/sbin/sysctl -w net.core.message_burst=80

ExecStartPre=/bin/bash -c "if [ $(nproc) -gt 8 ]; then /sbin/sysctl -w net.ipv4.neigh.default.gc_thresh1=4096; fi"
ExecStartPre=/bin/bash -c "if [ $(nproc) -gt 8 ]; then /sbin/sysctl -w net.ipv4.neigh.default.gc_thresh2=8192; fi"
ExecStartPre=/bin/bash -c "if [ $(nproc) -gt 8 ]; then /sbin/sysctl -w net.ipv4.neigh.default.gc_thresh3=16384; fi"
ExecStartPre=/sbin/sysctl -w net.ipv4.neigh.default.gc_thresh1=4096
ExecStartPre=/sbin/sysctl -w net.ipv4.neigh.default.gc_thresh2=8192
ExecStartPre=/sbin/sysctl -w net.ipv4.neigh.default.gc_thresh3=16384

ExecStartPre=-/sbin/ebtables -t nat --list
ExecStartPre=-/sbin/iptables -t nat --numeric --list
Expand Down
6 changes: 3 additions & 3 deletions pkg/engine/templates_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions test/e2e/kubernetes/scripts/net-config-validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ SOMAXCONN=16384
TCP_MAX_SYN_BACKLOG=16384
MESSAGE_COST=40
MESSAGE_BURST=80
GT_8_CORES_GC_THRESH1=4096
GT_8_CORES_GC_THRESH2=8192
GT_8_CORES_GC_THRESH3=16384
IPV4_NEIGH_GC_THRESH1=4096
IPV4_NEIGH_GC_THRESH2=8192
IPV4_NEIGH_GC_THRESH3=16384

set -x
grep $IPV4_SEND_REDIRECTS_VALUE /proc/sys/net/ipv4/conf/all/send_redirects || exit 1
Expand Down Expand Up @@ -46,8 +46,6 @@ grep $TCP_MAX_SYN_BACKLOG /proc/sys/net/ipv4/tcp_max_syn_backlog || exit 1
grep $MESSAGE_COST /proc/sys/net/core/message_cost || exit 1
grep $MESSAGE_BURST /proc/sys/net/core/message_burst || exit 1

if [[ "${GT_8_CORE_SKU}" == "true" ]]; then
grep $GT_8_CORES_GC_THRESH1 /proc/sys/net/ipv4/neigh/default/gc_thresh1 || exit 1
grep $GT_8_CORES_GC_THRESH2 /proc/sys/net/ipv4/neigh/default/gc_thresh2 || exit 1
grep $GT_8_CORES_GC_THRESH3 /proc/sys/net/ipv4/neigh/default/gc_thresh3 || exit 1
fi
grep $IPV4_NEIGH_GC_THRESH1 /proc/sys/net/ipv4/neigh/default/gc_thresh1 || exit 1
grep $IPV4_NEIGH_GC_THRESH2 /proc/sys/net/ipv4/neigh/default/gc_thresh2 || exit 1
grep $IPV4_NEIGH_GC_THRESH3 /proc/sys/net/ipv4/neigh/default/gc_thresh3 || exit 1