mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 03:09:08 +08:00
206b60a003
Use the kernel's built-in formula for computing this value. The value applied by OpenWRT's sysctl configuration file does not scale with the available memory, under-using hardware capabilities. Also, that formula also influences net.netfilter.nf_conntrack_buckets, which should improve conntrack performance in average (fewer connections per hashtable bucket). Backport upstream commit for its effect on the number of connections per hashtable bucket. Apply a hack patch to set the RAM size divisor to a more reasonable value (2048, down from 16384) for our use case, a typical router handling several thousands of connections. Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> (cherry picked from commit 15fbb916669dcdfcc706e9e75263ab63f9f27c00)
12 lines
463 B
Plaintext
12 lines
463 B
Plaintext
# Do not edit, changes to this file will be lost on upgrades
|
|
# /etc/sysctl.conf can be used to customize sysctl settings
|
|
|
|
net.netfilter.nf_conntrack_acct=1
|
|
net.netfilter.nf_conntrack_checksum=0
|
|
net.netfilter.nf_conntrack_tcp_timeout_established=7440
|
|
net.netfilter.nf_conntrack_udp_timeout=60
|
|
net.netfilter.nf_conntrack_udp_timeout_stream=180
|
|
net.netfilter.nf_conntrack_helper=1
|
|
net.netfilter.nf_conntrack_buckets=16384
|
|
net.netfilter.nf_conntrack_expect_max=16384
|