updated to clean up compiler issues with how functions were used from basis namespace;
[feisty_meow.git] / scripts / networking / set_tcp_config.sh
1 #!/bin/bash
2
3 # this script modifies the linux kernel for maximum tcp buffer size, which can
4 # improve long-haul transfers over a wan.
5
6 # new maximum buffer size to set.
7 new_max=4194304
8
9 echo "net.core.wmem_max=$new_max" >> /etc/sysctl.conf
10 echo "net.core.rmem_max=$new_max" >> /etc/sysctl.conf
11
12 echo "net.ipv4.tcp_rmem= 10240 87380 $new_max" >> /etc/sysctl.conf
13 echo "net.ipv4.tcp_wmem= 10240 87380 $new_max" >> /etc/sysctl.conf
14
15 echo "net.ipv4.tcp_window_scaling = 1" >> /etc/sysctl.conf
16
17 echo "net.ipv4.tcp_timestamps = 1" >> /etc/sysctl.conf
18
19 echo "net.ipv4.tcp_sack = 1" >> /etc/sysctl.conf
20
21 echo "net.ipv4.tcp_no_metrics_save = 1" >> /etc/sysctl.conf
22
23 echo "net.core.netdev_max_backlog = 5000" >> /etc/sysctl.conf
24