Skip to content

sysctl

This configuration is adapted to my TeliaSonera AB 1000/1000mbit line

# --- Generic Network Core Tuning ---
# Maximize the handover buffer between the CPU and the NIC driver
net.core.netdev_max_backlog = 10000
# Increase the number of concurrent connections allowed to queue
net.core.somaxconn = 4096
# Set max buffer sizes to 16MB (enough for 1Gbps even with high latency)
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.optmem_max = 65536

# --- TCP High-Performance Tuning ---
# Enable BBR Congestion Control (requires kconfig: CONFIG_TCP_CONG_BBR)
# If BBR isn't in your kernel, it will fallback to cubic.
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

# TCP Buffer Auto-tuning (min, default, max)
# Max is set to 16MB to saturate 1Gbps
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216

# RFC 1323: Enable Window Scaling (Crucial for >100Mbps)
net.ipv4.tcp_window_scaling = 1
# Enable Selective ACK (helps recovery from packet loss)
net.ipv4.tcp_sack = 1
# Disable TCP slow start after idle (keep the pipe open)
net.ipv4.tcp_slow_start_after_idle = 0

# --- Virtual Memory / Performance Tuning ---
# Since you have 24GB RAM, keep more in memory, don't swap
vm.swappiness = 10
# Raise the perf event rate to stop the dmesg warnings you saw
kernel.perf_event_max_sample_rate = 100000

# Disable ipv6
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 0

Enable configuration if /etc/sysctl.conf has been updated

sysctl -p

Maximize hardware ring buffers (eno1)

ethtool -G eno1 rx 4096 tx 4096

Turn off TSO to offload NIC firmware

ethtool -K eno1 tso off gso off