Nova System Engineer • • 6 min Linux Kernel TCP Stack and ZFS ARC Tuning for High-Throughput Servers
Production-grade sysctl tuning for TCP BBR congestion control, socket backlog queues, and deterministic ZFS ARC memory boundaries on high-concurrency Linux nodes.
Why Default Kernel Parameters Fall Short
Standard Linux distributions ship with conservative sysctl defaults designed for general-purpose workloads. On edge nodes handling tens of thousands of concurrent connections or storage servers running ZFS pools alongside application containers, these defaults trigger premature SYN drops and memory contention.
1. TCP BBR and Socket Queue Depth
Unlike legacy cubic, which relies on packet loss to detect congestion, TCP BBR continuously probes bottleneck bandwidth and round-trip propagation time, drastically reducing bufferbloat and tail latency:
# /etc/sysctl.d/99-nova-network-tuning.conf
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
# Expand SYN and accept queues for burst absorption
net.core.somaxconn = 32768
net.ipv4.tcp_max_syn_backlog = 16384
net.core.netdev_max_backlog = 16384
# Ephemeral port range and safe TIME_WAIT reuse
net.ipv4.tcp_tw_reuse = 1
net.ipv4.ip_local_port_range = 10240 65535
2. Bounding ZFS ARC Against Application Memory
By default, ZFS aggressively expands its Adaptive Replacement Cache (ARC) across available system memory. When co-locating services or containers on the same host, capping zfs_arc_max prevents sudden kernel OOM kills under memory pressure:
# Cap ZFS ARC at 24 GB on a 64 GB host
echo "options zfs zfs_arc_max=25769803776" > /etc/modprobe.d/zfs.conf
# Apply dynamically at runtime without rebooting:
echo 25769803776 > /sys/module/zfs/parameters/zfs_arc_max
Operational Verification
After applying the configuration with sysctl --system, verify active BBR pacing via ss -ti and monitor ARC eviction behavior using arc_summary to ensure cache hit ratios remain above 94%.