# Tuning the Linux kernel to achieve desired throughput in a single TCP # connection with a given round-trip time # The values here are given if you want to reach 1 Gb/s over a 100ms RTT link # Adapt to your needs and then sysctl(8) -p this file # Required TCP window size is throughput * latency # 1 Gb/s * 100 ms = 12.5 MB # Reserve 1/4 of buffers for application net.ipv4.tcp_adv_win_scale = 2 # The rest is TCP window # Buffers need to be 4/3 of window # Make it 16 MiB (> 12.5*4/3 MB) net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 87380 16777216 # Double this max for net.core buffers (32MiB) net.core.rmem_max = 33554432 net.core.wmem_max = 33554432 # That is 22.4k packets of 1500 bytes net.core.netdev_max_backlog = 25000 # Optionnaly, use htcp congestion control # Requires modprode tcp_htcp # In order to load module at boot time # echo tcp_htcp >> /etc/modules # net.ipv4.tcp_congestion_control = htcp