gc_thresh

 

[31893433.514747] SERVER: no IPv6 routers present
[31893451.138068] net_ratelimit: 717 callbacks suppressed
[31893451.143803] ipv6: Neighbour table overflow.                         <--- 這一行
[31893451.149135] ipv6: Neighbour table overflow.

'net_ratelimit()' is used to limit syslog messages from kernel.
This "callbacks suppressed" message implies it suppressed a bulk of 717 syslog messages.
This is an attempt to avoid loading your syslog logging path.

============================================

"arp -n" or "ip neigh show" will only show some of the entries in the cache.

ip route show cache table all

/proc/sys/net/ipv4/neigh/default/gc_thresh1
/proc/sys/net/ipv4/neigh/default/gc_thresh2
/proc/sys/net/ipv4/neigh/default/gc_thresh3

128
512
1024

net.ipv6.neigh.default.gc_thresh1 = 1024
net.ipv6.neigh.default.gc_thresh2 = 2048
net.ipv6.neigh.default.gc_thresh3 = 4096

128
512
1024

/etc/sysctl.d/ipv6-neighbour-table-thresholds.conf

    net.ipv6.neigh.default.gc_thresh1 = 512
    net.ipv6.neigh.default.gc_thresh2 = 2048
    net.ipv6.neigh.default.gc_thresh3 = 4096

sysctl -p /etc/sysctl.d/ipv6-neighbour-table-thresholds.conf

===========================

defined in the Linux Kernel Code in the header file /include/net/neighbour.h

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.

===========================

net.ipv4.neigh.default.base_reachable_time = 86400
net.ipv4.neigh.default.gc_stale_time = 86400

https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_do...
http://vincent.bernat.im/en/blog/2011-ipv4-route-cache-linux.html

 

 

 

Creative Commons license icon Creative Commons license icon