22.03-SNAPSHOT was defaulting to about 14k max active connections, I want to increase this number to 32k as I have more than enough RAM, but while researching the topic I found the information around sysctl to be confusing, OpenWRT does not follow the official guidance.
I've ran this script:
cat << "EOF" >> /etc/sysctl.conf
net.netfilter.nf_conntrack_buckets=32768 #was 14000
net.netfilter.nf_conntrack_expect_max=256 #was 232
net.netfilter.nf_conntrack_max=32768 #was 14000
But I'm not sure if it makes sense, could someone with better knowledge give me pointers on this topic?
# Defaults are configured in /etc/sysctl.d/* and can be customized in this file
Seems quite alright to me and I am also adding my customizations there too.
The release version (22.03.x) appears to have 64,512 set by default - at least on my device.
The default values depend on your system's hardware resources, both in master and 22.03
Here is the 22.03 commit:
08:54PM - 11 Aug 22 UTC
Use the kernel's built-in formula for computing this value.
The value applied by
How much RAM does your device have?
the 22.03 commit
OK, I recall multiple discussions on that notion - which I've followed since OpenWrt added the parameter (as I'm sure you recall). Cool.
The device I screenshoted has 512 MB of RAM.
I have two routers with 512 MB RAM , and they have somewhat different values:
59392 in my R7800 and 31744 in my RT3200 as the shown number of max. connections.