Hi
I use HAOS in ProxMox. Using WireShark, I sometimes see arp requests from HA on devices that HA has already recently been talking to. If I check the HA arp cache size I see these values:
➜ ~ sysctl -a | grep "eigh.default.gc_thresh"
sysctl: reading key "kernel.apparmor_display_secid_mode"
sysctl: reading key "kernel.apparmor_restrict_unprivileged_unconfined"
sysctl: reading key "kernel.unprivileged_userns_apparmor_policy"
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
➜ ~
128 devices is lower than the amount of devices my HA system communicates with. If I count the number of arp entries on my HA system I can see I’m at the 128 limit:
➜ ~ arp -a | wc -l
128
➜ ~
I’d like to increase the arp cache values to reduce the amount of arp “who has” requests HA is generating. I’d normally do this by creating a file in /etc/sysctl.d containing something like:
net.ipv4.neigh.default.gc_thresh1=2048
net.ipv4.neigh.default.gc_thresh2=4096
net.ipv4.neigh.default.gc_thresh3=8192
However, give the docker situation on HA, I’m not sure how to do this. I’ve used “docker exec -it homeassistant /bin/bash” to create a /etc/sysctl.d/90-arp-cache.conf entry, but this is ignored when HA boots. I’d appreciate any advice on how I can increase the arp cache size but in a HA friendly way, so it will survive HA updates etc.
Thanks!