Arp Cache Limit Exceeded | How to Adjust in Sysctl.conf

Hi All,

I encountered an arp cache exceeded limit:

Output of dmesg:

[11474143.315539] neighbour: arp_cache: neighbor table overflow!
[11474143.316565] neighbour: arp_cache: neighbor table overflow!
[11474143.317507] neighbour: arp_cache: neighbor table overflow!
[11474143.318807] neighbour: arp_cache: neighbor table overflow!
[11474143.326468] neighbour: arp_cache: neighbor table overflow!
[11474143.329394] neighbour: arp_cache: neighbor table overflow!
[11474143.334250] neighbour: arp_cache: neighbor table overflow!
[11474143.335421] neighbour: arp_cache: neighbor table overflow!
[11474143.337814] neighbour: arp_cache: neighbor table overflow!
[11474143.340676] neighbour: arp_cache: neighbor table overflow!

We noticed when looking at our DHCP server hosted on the container & saw some failure messages on the server which resulted in re-transmits and a smalls spike in traffic.

I am having difficulty finding how to adjust the arp cache for the lxd (ubuntu 18.04.5)

It looks like I should be able to edit the sysctl.conf file and reload the container, using the following variables:

$ sysctl net.ipv4.neigh.default.gc_thresh1
net.ipv4.neigh.default.gc_thresh1 = 128
$ sysctl net.ipv4.neigh.default.gc_thresh2
net.ipv4.neigh.default.gc_thresh2 = 512
$ sysctl net.ipv4.neigh.default.gc_thresh3
net.ipv4.neigh.default.gc_thresh3 = 1024

But when I try to check them, I do not see that they are set.

I get this message when I try to check them:

sysctl: cannot stat /proc/sys/net/ipv4/neigh/default/gc_thresh3: No such file or directory

I don’t see them set in the /etc/sysctl.conf file either. It is just commented out all together.
sysctl -a reports a lot of flags/variables set, but none equate to the neighbor thresholds, that I can tell.

Is this something I have to set in the LXD config?

You can set this on the host, see

https://linuxcontainers.org/lxd/docs/master/production-setup#server-changes

Thank you for the quick response & help! You also helped out on the IRC channel very quickly as well. I appreciate it!

1 Like

How can I apply this setting without a reboot? Can I just perform sysctl -p ?

Yeah, most of those can be applied live with sysctl -p, some may be inherited by containers as they start and so need a restart of the containers to pick up the change.

1 Like