首页/系统/Linux 内核与性能调优速查/net.ipv4.neigh.default.gc_thresh ARP 表阈值
本包目录(357 条)
sysctl 内核参数72 条
CPU 与调度60 条内存与 OOM58 条磁盘与 IO32 条网络栈调优98 条性能分析工具37 条

net.ipv4.neigh.default.gc_thresh ARP 表阈值

邻居表回收的三个阈值(默认 128/512/1024);同网段大量主机时表满会打印 neighbor table overflow 并影响通信。

参数neigh.default.gc_thresh1/2/3
默认值128 / 512 / 1024
表满日志neighbour: neighbor table overflow!

查看与调整

查看与调整
sysctl net.ipv4.neigh.default.gc_thresh1 net.ipv4.neigh.default.gc_thresh2 net.ipv4.neigh.default.gc_thresh3
dmesg | grep -i neighbour
sysctl -w net.ipv4.neigh.default.gc_thresh3=16384
虚拟化/容器平台同网段主机规模大时,三个阈值需要一起放大(保持递增关系)。

易错点

  • 表满表现为间歇性连接异常,先在 dmesg 搜 overflow 证据再调参数
  • 只调 gc_thresh3 不调前两档会让回收策略失衡,三个值按比例整体调整

数据来源与参考

  • Linux 内核 Documentation/networking/ip-sysctl.rst
  • Linux 内核 Documentation/networking/neighbour.rst
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌