Skip to content

Commit 748540c

Browse files
committed
neigh: enable garbage collection
VIPs and floating ips that move between differnet interfaces might stay for very long times cached incorrectly in the neighbor table until the garbage collection kicks in. by default a STALE (so an entry that used to have an active connection but now doesn't anymore) gets garbage collected after gc_stale_timeout, but *only* if there are more than gc_thresh1 STALE entries in total. The default of 128 means that one has to accumulate 128 stale entries (or trigger a forced cache flush) until this is happening, which for small/low traffic clouds can take an eternity.
1 parent 2bcd96c commit 748540c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

chef/cookbooks/network/templates/default/sysctl_10gbe.conf.erb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
net.ipv4.ip_local_reserved_ports = 35357
77
# Increase system IP port range to allow for more concurrent connections
88
net.ipv4.ip_local_port_range = 27018 64999
9+
# ensure STALE neighbor entries expire from the cache, otherwise
10+
# VIPs of an OpenStack service or the floating IP of a VM
11+
# might not become reachable
12+
# gc_thresh1 is the lower threshold that needs to be reached before
13+
# stale entries are getting garbage collected. The default of 128 means
14+
# small clouds never get garbage collection and consequently suffer
15+
# from reachability issues
16+
net.ipv4.neigh.default.gc_thresh1 = 0
917

1018
#- from https://fasterdata.es.net/host-tuning/linux/
1119
# allow testing with buffers up to 128MB

0 commit comments

Comments
 (0)