Skip to content

Instantly share code, notes, and snippets.

@Bhavya031
Created August 17, 2025 11:14
Show Gist options
  • Save Bhavya031/f5c1ef36decd60509532dd8c4b1929b5 to your computer and use it in GitHub Desktop.
Save Bhavya031/f5c1ef36decd60509532dd8c4b1929b5 to your computer and use it in GitHub Desktop.
# Network buffer optimizations
net.core.rmem_default = 262144
net.core.rmem_max = 16777216
net.core.wmem_default = 262144
net.core.wmem_max = 16777216
net.core.netdev_max_backlog = 5000
net.core.netdev_budget = 600
# TCP optimizations
net.ipv4.tcp_rmem = 4096 65536 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_congestion_control = bbr
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_intvl = 15
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_tw_reuse = 1
net.core.somaxconn = 65535
net.ipv4.tcp_max_syn_backlog = 65535
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_tw_buckets = 1440000
# Memory and disk I/O optimizations
vm.dirty_background_bytes = 134217728
vm.dirty_bytes = 268435456
vm.dirty_writeback_centisecs = 100
vm.dirty_expire_centisecs = 1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment