Updated config

This commit is contained in:
Eduard Urbach 2025-06-26 15:20:16 +02:00
parent 6d7312c465
commit c04af12b8e
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
6 changed files with 98 additions and 0 deletions

View file

@ -0,0 +1,51 @@
# Disable swap
vm.swappiness = 0
# Maximum percentage of memory with disk write buffers
vm.dirty_ratio = 30
# Percentage of memory with disk write buffers until writes start
vm.dirty_background_ratio = 15
# Prefer directory and inode caches
vm.vfs_cache_pressure = 50
# Prefer low latency over high throughput
net.ipv4.tcp_low_latency = 1
# Enable TCP Fast Open (lower latency)
net.ipv4.tcp_fastopen = 3
# Set congestion control to BBR
net.ipv4.tcp_congestion_control = bbr
net.core.default_qdisc = fq
# Additional send buffer size (improves HTTP/2 prioritization)
net.ipv4.tcp_notsent_lowat = 16384
# Maximum number of established connections
net.core.somaxconn = 32768
# Maximum number of half-open connections
net.ipv4.tcp_max_syn_backlog = 32768
# Receive queue size per CPU core
net.core.netdev_max_backlog = 16386
# Read buffer size
net.ipv4.tcp_rmem = 4096 65536 102400000
net.ipv4.udp_rmem_min = 16384
net.core.rmem_default = 65536
net.core.rmem_max = 102400000
# Write buffer size
net.ipv4.tcp_wmem = 4096 65536 102400000
net.ipv4.udp_wmem_min = 16384
net.core.wmem_default = 65536
net.core.wmem_max = 102400000
# Maximum per-socket optional memory buffer size
net.core.optmem_max = 65536
# Disable slow start restart
net.ipv4.tcp_slow_start_after_idle = 0

View file

@ -0,0 +1,24 @@
# Reduce timeout for stale connections
net.ipv4.tcp_fin_timeout = 10
# Reduce keep alive time
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_intvl = 60
# Reduce connection time to fail
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_synack_retries = 1
# Prevent simple DoS attacks
net.ipv4.tcp_max_tw_buckets = 1048576
# Disable ICMP redirects
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0

View file

@ -0,0 +1,3 @@
# Time in us to busy loop waiting for packets
#net.core.busy_read = 50
#net.core.busy_poll = 50

View file

@ -0,0 +1,3 @@
# Ensure that new connections use the new values
net.ipv4.route.flush = 1
net.ipv6.route.flush = 1