Slow broadband in Ubuntu Hardy? - Speed up your internet connection

StumbleThis
If you have noticed a drastic slowdown in your DSL internet connection after you upgraded to Ubuntu Hardy Heron (Ubuntu 8.04) then it might not be that your ISP is entirely to blame. It could be settings on your PC that is slowing things down. We had a problem in our office where Ubuntu PCs were getting only around 80Kbps as opposed to 2Mbps from Windows machines. After troubleshooting and playing with some configuration parameters we got the Ubuntu Machines up to the same level as the Windows PCs

The solution is simple. All you have to do is to open /etc/sysctl.conf and add the following to the end of the file. You might have to tweak the value 32768 (all occurrences in the following) to any power of 2 that works perfectly fine for you. We had seen several places where these values were different. 32768 was the value for which we had the best results on the BSNL bandwidth test. We use this test because we have a BSNL broadband connection. Once the file is saved you can reload these kernel parameters by running sudo sysctl -p or by simply restarting the system.

# Tweaks for faster broadband...
net.core.rmem_default = 32768
net.core.rmem_max = 32768
net.core.wmem_default = 32768
net.core.wmem_max = 32768
net.ipv4.tcp_wmem = 4096 32768 32768
net.ipv4.tcp_rmem = 4096 32768 32768
net.ipv4.tcp_mem = 32768 32768 32768
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
Although this fix was tried out in Ubuntu it is possible that this might work for other distros with comparable kernels. It looks like the DSL routers and connections are optimized for the default values used in windows. So we just tweak the values used in GNU/Linux to match the router - simple :-)

Comments

Typo

"you can reload these kernel parameters by running sudo systl -p or by simply restarting the system."
Its a typo here... it should be sysctl -p

Typo removed

Thanks Sriram.
The error is rectified

Thank you very much

Team Zyxware

Cannot save sysctl.conf

i tried saving sysctl.conf, but it said i didnt have the rights to save as i'm not the owner

Broadband internet speed-up

I dont know whether you still face problem with broadband.

Try typing sudo gedit sysctl.conf at terminal and enter your password and then make the changes and try saving it. It will work.

how to

nice article, how can i speed up the internet using asianet modem

systl

When I tried the command "sudo systl -p", I got the message:
sudo: systl: command not found

However the command sysctl is present. Please confirm this and if possible, correct it.
Regards,
Gokul

Increase BSNL Broadband speed

Dear Gokul,

It was a typo which is corrected now. You need to type "sudo sysctl -p" for this to work

Joju Joshua
Team Zyxware

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is for testing whether you are a human visitor
3 + 6 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.