perf(storage): optimize NVMe-oF and Ceph TCP socket queue depths and BBR congestion control on k3s worker nodes
Author: stefanutc1Created Aug 31, 2026Updated Aug 31, 2026
Performance Optimization Proposal
During high-concurrency storage replication bursts (e.g. Ceph OSD peering, Longhorn volume rebuilds, and distributed Rook snapshots) across bare-metal worker nodes, default Linux socket memory boundaries (rmem_default, wmem_default) and standard cubic congestion control generate micro-burst queue packet drops.
Proposed Parameter Tuning
- TCP Socket Memory Windows:
net.core.rmem_max = 67108864(64MB)net.core.wmem_max = 67108864(64MB)net.ipv4.tcp_rmem = 4096 87380 67108864net.ipv4.tcp_wmem = 4096 65536 67108864
- Ingress Queue Backlog Depth:
net.core.netdev_max_backlog = 300000net.core.somaxconn = 65535
- TCP BBR & Fair Queueing:
net.core.default_qdisc = fqnet.ipv4.tcp_congestion_control = bbr
These settings eliminate packet drops during 10GbE multi-gigabit storage synchronization while keeping latency minimal.
Source: khuedoan/homelab