Skip to content

Instantly share code, notes, and snippets.

@Firefishy
Created March 23, 2017 17:57
Show Gist options
  • Save Firefishy/2aa2174a18fd2c1051e5cc0da543ba3a to your computer and use it in GitHub Desktop.
Save Firefishy/2aa2174a18fd2c1051e5cc0da543ba3a to your computer and use it in GitHub Desktop.
Safe sysctl tuning for modern high traffic systems
# Enable Packetization Layer Path MTU Discovery.
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_base_mss = 1024
# Ensure slow start is disabled
# https://github.com/ton31337/tools/wiki/tcp_slow_start_after_idle---tcp_no_metrics_save-performance
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_no_metrics_save = 0
# Tune network buffers - servers have more than 16MB of RAM in 2017
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
@jult
Copy link

jult commented Apr 24, 2018

Those rmem and wmem values cause bufferbloat.
Also consider changing to fq_codel; https://lwn.net/Articles/616241/
Here's my sysctl.conf; https://gist.github.com/jult/19decfc31ffae0b2b3fa4d48e2ffdd9f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment