sysctl.conf Settings For Linux
Ever on the quest to get the most out of the servers that I manage, here are some valid sysctl.conf profiles to deploy on Linux 6.12 and newer systems. This was originally intended for Linux 4.x systems, and has since been updated.
End-User Systems / VMs and Physical Servers#
# On-site /etc/sysctl.conf
# Michael Adams; unquietwiki.com; updated Jun 9, 2026
# Revised for kernel 6.12+ with help from Claude (Anthropic)
# Scale *_backlog (8192) down to 1024/2048 on small systems.
# --- File / connection limits ---
fs.file-max = 4194304
# kernel default is now 4096; raise, don't lower
net.core.somaxconn = 16384
net.core.netdev_max_backlog = 8192
net.ipv4.tcp_max_syn_backlog = 8192
# --- Congestion control + pacing ---
# 'bbr' = BBRv1 on mainline 6.12. Pair with fq for proper pacing.
net.ipv4.tcp_congestion_control = bbr
# fq for BBR endpoints; use cake on shaping routers
net.core.default_qdisc = fq
# --- Buffers (64MB max ~ 1Gbit @ 0.5s or 10Gbit @ ~50ms; bump to 128MB for 10GbE long-haul) ---
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
# --- TCP behavior ---
net.ipv4.tcp_slow_start_after_idle = 0
# good for outbound/proxy-heavy roles
net.ipv4.tcp_tw_reuse = 1
# 1 = probe on blackhole detect (tunnel-safe); 2 = always
net.ipv4.tcp_mtu_probing = 1
# --- IPv6: disable privacy addressing on servers for stable SLAAC/DNS ---
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
# --- Optional host/memory (uncomment as needed) ---
#vm.swappiness = 10
#vm.dirty_background_ratio = 5
#vm.dirty_ratio = 15
#fs.inotify.max_user_watches = 524288
# --- Router (uncomment to forward) ---
# prefer cake here over fq
#net.core.default_qdisc = cake
#net.ipv4.ip_forward = 1
#net.ipv6.conf.all.forwarding = 1
#net.ipv6.conf.default.forwarding = 1
# loose RPF for asymmetric/multi-homed (VPN gw)
#net.ipv4.conf.all.rp_filter = 2
#net.netfilter.nf_conntrack_max = 262144
Cloud and Web Instances#
# Cloud & Web /etc/sysctl.conf
# Michael Adams; unquietwiki.com; updated Jun 9, 2026
# Revised for kernel 6.12+ with help from Claude (Anthropic)
# --- Defaults ---
fs.file-max = 2097152
# was 2048 — that now sits below the kernel default
net.core.somaxconn = 4096
net.core.netdev_max_backlog = 8192
net.ipv4.tcp_max_syn_backlog = 8192
# --- Congestion control + pacing ---
net.ipv4.tcp_congestion_control = bbr
net.core.default_qdisc = fq
# --- Buffers (8MB max; tune with a BDP calc for your routes) ---
net.core.rmem_max = 8388608
net.core.wmem_max = 8388608
net.ipv4.tcp_rmem = 4096 87380 8388608
net.ipv4.tcp_wmem = 4096 65536 8388608
# --- TCP behavior ---
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_mtu_probing = 1
net.ipv4.ip_local_port_range = 10240 65535
# --- Server / managed ---
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
# --- Router (uncomment to forward) ---
#net.core.default_qdisc = cake
#net.ipv4.ip_forward = 1
#net.ipv6.conf.all.forwarding = 1
#net.ipv6.conf.default.forwarding = 1
Read other posts