Linux Remote Stream Optimization

Tips

Hi folks!

Lately I've been playing around with Linux configuration to improve remote streams, especially overseas connections. Just sharing in case it helps the next person. After these changes, I'm able to maintain a bandwidth 6x larger than I used to. Several transcodes are now direct play. While not all of these settings have the same impact, I'm sharing all of them so you can take as you please. You can apply them to /etc/sysctl.conf file:

# Fair queuing to make sure Plex packets are getting through even during congestion
net.core.default_qdisc = fq_codel

# Stable throughput in the face of variable network conditions (packet loss, jitter), reducing rate‑adaptation stalls on the client.
net.ipv4.tcp_congestion_control = bbr

net.core.rmem_max = 16777216
net.core.wmem_max = 16777216

# Raise default window sizes (min 4 KiB - default 256 KiB - max 16 MiB)
net.ipv4.tcp_rmem = 4096 262144 16777216
net.ipv4.tcp_wmem = 4096 262144 16777216

# Help TCP recover from packet loss (common on long paths) and accurately measure RTT
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_timestamps = 1

# Avoids black‑hole MTU issues
net.ipv4.tcp_mtu_probing = 1

# Don’t restart slow‑start after idle
net.ipv4.tcp_slow_start_after_idle = 0

# Attempts to use ISP support for ECN, cuts queueing delay
net.ipv4.tcp_ecn = 2

Posted Jul 9, 2025, 11:21 PM UTC

23
Loading comments…