| | 1 | Add these settings to /etc/sysctl.conf and run the command sysctl -p |
| | 2 | {{{ |
| | 3 | net.core.rmem_max=62500000 |
| | 4 | net.core.wmem_max=62500000 |
| | 5 | net.ipv4.tcp_rmem=4096 87380 62500000 |
| | 6 | net.ipv4.tcp_wmem=4096 16384 62500000 |
| | 7 | net.core.netdev_max_backlog = 2500 |
| | 8 | net.ipv4.tcp_moderate_rcvbuf=1 |
| | 9 | net.ipv4.tcp_timestamps=1 |
| | 10 | net.ipv4.tcp_window_scaling=1 |
| | 11 | net.ipv4.tcp_sack=1 |
| | 12 | net.ipv4.tcp_ecn=1 |
| | 13 | net.ipv4.tcp_adv_win_scale=7 |
| | 14 | net.ipv4.tcp_syncookies=0 |
| | 15 | net.ipv4.tcp_congestion_control=cubic |
| | 16 | |
| | 17 | }}} |
| | 18 | |
| | 19 | The output should look something like: |
| | 20 | |
| | 21 | {{{ |
| | 22 | ipp000 ~ # sysctl -p |
| | 23 | net.ipv4.ip_forward = 0 |
| | 24 | net.ipv4.conf.default.rp_filter = 1 |
| | 25 | net.core.rmem_max = 62500000 |
| | 26 | net.core.wmem_max = 62500000 |
| | 27 | net.ipv4.tcp_rmem = 4096 87380 62500000 |
| | 28 | net.ipv4.tcp_wmem = 4096 16384 62500000 |
| | 29 | net.core.netdev_max_backlog = 2500 |
| | 30 | net.ipv4.tcp_moderate_rcvbuf = 1 |
| | 31 | net.ipv4.tcp_timestamps = 1 |
| | 32 | net.ipv4.tcp_window_scaling = 1 |
| | 33 | net.ipv4.tcp_sack = 1 |
| | 34 | net.ipv4.tcp_ecn = 1 |
| | 35 | net.ipv4.tcp_adv_win_scale = 7 |
| | 36 | error: "net.ipv4.tcp_syncookies" is an unknown key |
| | 37 | net.ipv4.tcp_congestion_control = cubic |
| | 38 | }}} |
| | 39 | |
| | 40 | Note that setting net.ipv4.tcp_syncookies failed because support for syncookies was not enabled in the kernel (on purpose in this case). This doesn't matter since we were trying to disable this feature anyways. However, there is a chance on older kernel that's the "cubic" tcp congestion control algorithm is not available. If you get an error setting this key to cubic, please look into upgrading or rebuilding your kernel with support for the cubic and/or BIC algorithms. |
| | 41 | |