Page MenuHomeVyOS Platform

Increase default gc_thresh
Closed, ResolvedPublicFEATURE REQUEST


By default sysctl params for gc_thresh is small if we use VyOS as BRAS or DHCP Server (L2).
Also it can take negative effect if we use VRRP and active arp entries more than 512.
Default params:

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

net.ipv6.neigh.default.gc_thresh1 = 128
net.ipv6.neigh.default.gc_thresh2 = 512
net.ipv6.neigh.default.gc_thresh3 = 1024

Proposed params:

net.ipv4.neigh.default.gc_thresh1 = 2048
net.ipv4.neigh.default.gc_thresh2 = 4096
net.ipv4.neigh.default.gc_thresh3 = 8192

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

Sure we can increase this params via CLI, but I think best practices if we add this params by default.

set system ip arp table-size 8192
set system ipv6 neighbor table-size 8192


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

syncer triaged this task as High priority.
syncer edited projects, added VyOS 1.2 Crux (VyOS 1.2.5); removed VyOS 1.2 Crux.

The size of an ARP cache entry is 384 bytes (x86-64), so the change will add ~720k -- ~3 MiB, which seems reasonable. I will add the suggested settings to sysctl defaults.

For consistency with the relative sizes set by CLI in the conf_mode script (, the default params should be:

net.ipv4.neigh.default.gc_thresh1 = 1024
net.ipv4.neigh.default.gc_thresh2 = 4096
net.ipv4.neigh.default.gc_thresh3 = 8192

net.ipv6.neigh.default.gc_thresh1 = 1024
net.ipv6.neigh.default.gc_thresh2 = 4096
net.ipv6.neigh.default.gc_thresh3 = 8192
jestabro moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.
jestabro moved this task from Needs Triage to Backlog on the VyOS 1.2 Crux (VyOS 1.2.5) board.

As I recently rewrote this part in XML/Python please also check the default values in the Python script

if this lines up with your expected behavior. This was rewritten und uses the same logic as in crux so the sysctl setting could probably be backported, too.

Yes, thanks, c-po; the revised settings (above) are consistent with defaults and behaviour for both crux and equuleus.