Docs / Performance Optimization / TCP Tuning for High-Performance Networking on Linux

TCP Tuning for High-Performance Networking on Linux

By Admin · Mar 1, 2026 · Updated Apr 24, 2026 · 28 views · 1 min read

Why Tune TCP Settings?

Default Linux TCP parameters are designed for broad compatibility rather than peak throughput. On a Breeze handling heavy traffic or large file transfers, tuning the TCP stack can reduce latency, increase throughput, and improve connection handling under load.

Prerequisites

  • A Breeze running Ubuntu 22.04 or later
  • Root or sudo access

Step 1: Increase Buffer Sizes

Edit the sysctl configuration:

sudo nano /etc/sysctl.d/99-tcp-tuning.conf

Add the following settings:

# Increase TCP buffer sizes
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216

Step 2: Optimize Connection Handling

# Increase backlog for incoming connections
net.core.somaxconn = 65535
net.core.netdev_max_backlog = 65535

# Enable TCP Fast Open
net.ipv4.tcp_fastopen = 3

# Reduce TIME_WAIT sockets
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 15

Step 3: Enable BBR Congestion Control

# Use BBR for better throughput
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

Step 4: Apply Changes

sudo sysctl --system

Verify BBR is active:

sysctl net.ipv4.tcp_congestion_control

Monitoring Performance

  • Use ss -s to view socket statistics and connection states
  • Run iperf3 to benchmark network throughput before and after tuning
  • Check netstat -s | grep -i retrans for retransmission rates
  • These settings persist across reboots on your Breeze via the sysctl.d file

Was this article helpful?