问题原文
原帖链接 · vinni_f · CC BY-SA 4.0
We recently had a storm of kernel: neighbour: arp_cache: neighbor table overflow! errors on some nodes of our kubernetes cluster.
After research we've figured out that we needed to bump our servers net.ipv4.neigh.default.gc_thresh{1,2,3} to match the needs of some of the new applications that have recently been added to our cluster.
While doing some research I was not able to find any decent way to calculate what would be the best suited values to put there.
How does one figures out what should be set there?
已采纳解答
原帖链接 · vinni_f · CC BY-SA 4.0
Here is what I ended up doing:
Collected data from all the servers with that:
for n in ip netns; do echo -en "$n: "; sudo ip netns exec $n arp -an|wc -l; done 2>&1 | grep -v 'No such file or directory' > /tmp/arp.log
count=0for i in cat /tmp/arp.log|awk '{ print $2 }'; do count=expr $count + $i; done
echo $count
rm -f /tmp/arp.log
Figured out my top value, doubled that and that number is my new gc_thresh3.
NOTE: Something that is not accounted for in the last commands is that some containers are using the host network so that means that the actual amount of entries in the table is probably lower. Since the hit on the RAM is insignificant I didn't care about that.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
