Linux Kernel WireGuard tuning
This technical guide addresses requirements regarding WireGuard VPN latency, throughput, resilience, and scalability by tuning Linux Kernel parameters (as WireGuard is part of Linux Kernel).
Introduction
Kernel tuning
Congestion Control & Queuing (Latency & Throughput)
# Use BBR congestion control
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbrMemory & Buffers (Throughput)
# Increase default and max receive/send window sizes (approx 16MB)
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.ipv4.udp_mem = 4096 87380 16777216
Packet Processing & Forwarding (Efficiency)
Packet buffering
Home/Small Office
50 VPN users and above
High throughput ≥ 10Gbps
Multiple connection concurrency (egress via VPN)
Parameter (Sysctl)
Description
10 Devices(Home/SOHO)
100 Devices(SMB/Office)
1,000 Devices(Enterprise/ISP)
10,000 Devices(Data Center)
Last updated