Neighbour table overflow

kern.warning :Neighbour table overflow

这几天查看bug列表的时候,发现一个关于 Neighbour table overflow相关的bug。

从字面上看应该是内核 ARP 相关的 table cache 用光了,在这种情况下应该增加 ARP table cache 的大小。

那么该如何增加是一个问题,有问题先Google一下。

发现好多关于该问题的解决方法:

大致都是通过 sysctl 命令来修改内核参数来增加 table cache 的大小:

net.ipv4.neigh.default.gc_thresh1
net.ipv4.neigh.default.gc_thresh2
net.ipv4.neigh.default.gc_thresh3

These 3 parameters are defined in the Linux Kernel Code in the header file /include/net/neighbour.h as integer.
Gaia Portal accepts maximal value of 16384.

gc_thresh1
The minimum number of entries to keep in the ARP cache.
The garbage collector will not run if there are fewer than this number of entries in the cache.

gc_thresh2
The soft maximum number of entries to keep in the ARP cache. 
The garbage collector will allow the number of entries to exceed this for 5 seconds before collection will be performed.

gc_thresh3
The hard maximum number of entries to keep in the ARP cache. 
The garbage collector will always run if there are more than this number of entries in the cache.

In order for the garbage collector to work properly, and not to overload the machine with garbage collections, when changing the gc_thresh3 parameter, user should (note: does not have to) change the gc_thresh2 and gc_thresh1 parameters accordingly.

关于这几个参数的解释在 kernel: neighbour table overflow 中有详细的解释。

而在Linux: Neighbour Table Overflow Error and Solution中,介绍的方法

Solving neighbour table overflow errors (large subnets)中介绍了在子网很多的时候如何设置这些参数。

https://github.com/freifunk-gluon/gluon/issues/83

综上关于这个问题主要是修改这几参数,通过不同的参数调节,可以达到用户的不同要求。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值