Saturday, May 05, 2007
Tweaking Linux for broadband connection
http://www.santa-li.com/linuxonbb.html:
You can pick an arbitrarily large window size (for the most part) and not have to worry too much about making it too big. I use a window size of 512 KB (or 524288 bytes) myself, and I have no problems at all. My brother, who runs Linux over a different broadband provider than I have, had some trouble with using 512 KB--so, instead he used 256 KB (or 262144 bytes) which worked better for him. Typically, you will notice that your connection is actually slower than the default settings if your window size is too big. That being said, you should try out different size window sizes and see what works best for you--but, in most cases either 512 KB, 256 KB, or 128 KB seem to do the trick quite nicely.
/etc/sysctl.conf (substituting your window size in place of 524288, if necessary):
And turn off IPv6:
sudo su
echo 'alias net-pf-10 off' >> /etc/modprobe.d/blacklist_ipv6
Check after reboot:
lsmod | grep ipv6
dmesg | grep 'family 10'
You can pick an arbitrarily large window size (for the most part) and not have to worry too much about making it too big. I use a window size of 512 KB (or 524288 bytes) myself, and I have no problems at all. My brother, who runs Linux over a different broadband provider than I have, had some trouble with using 512 KB--so, instead he used 256 KB (or 262144 bytes) which worked better for him. Typically, you will notice that your connection is actually slower than the default settings if your window size is too big. That being said, you should try out different size window sizes and see what works best for you--but, in most cases either 512 KB, 256 KB, or 128 KB seem to do the trick quite nicely.
/etc/sysctl.conf (substituting your window size in place of 524288, if necessary):
# Tweaks for faster broadband...
net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_ecn = 0
net.ipv4.route.flush = 1
And turn off IPv6:
sudo su
echo 'alias net-pf-10 off' >> /etc/modprobe.d/blacklist_ipv6
Check after reboot:
lsmod | grep ipv6
dmesg | grep 'family 10'