11

I have a dual boot set up with Windows and Ubuntu. When I'm using Windows, web browsing is a lot faster than when I'm using Ubuntu and I don't know why. It's like there's just a big latency rather than the maximum speed is lower, there's a big delay before anything happens when using Ubuntu, it happens with all websites all the time. I've never configured the Internet connection because it just worked straight away. I have a broadband connection through a router shared with some other computers. When we set up the router and Internet connection everything was done with Windows. What could I do to fix this?

Braiam
  • 67,791
  • 32
  • 179
  • 269
Ayeayeron
  • 321
  • 1
    I marked this as a favourite cause I want to see where this is going. What do you mean by "a big delay"? What browser are you using? Are you using a proxy? Chances are your problem isn't the OS at all. Chances are it's not a real delay either, but just the way firefox loads websites. Anyway, I'll wait for you to add more information. – RolandiXor Jan 13 '11 at 03:57
  • 2
    Have you turned IPV6 in your browser? – karthick87 Jan 13 '11 at 04:35
  • In both windows and Ubuntu I'm using firefox and I have not turned on IPV6 if it's not on by default. By a big delay I mean when using Ubuntu a page will take about 15 seconds to load rather than a few, but I can still download at 100's of kb per second from repositories. – Ayeayeron Jan 14 '11 at 20:24
  • Everyone knows you need SABAYON for EXTREME BROWSING! http://www.sabayon.org/ | glad to help! – Apache Apr 22 '13 at 22:34
  • sudo apt-get remove bind9 dnsmasq-base this command killed both my ethernet and wifi connections. DO NOT REMOVE dnsmasq-base took me a few hours to get it back up. –  Apr 22 '13 at 22:08
  • Can you add the ping times to google? ping google.com and ping 8.8.8.8? – Braiam May 20 '14 at 18:24
  • I have the same problem too, and I've narrowed down the cause, but I do not have the answer yet. I believe it has something to do with the router, because when I took it to the Public Library, the wifi became normal again. Hopefully this helps Here's a link to my question: http://askubuntu.com/q/132317/61067 – Kevin May 24 '12 at 01:00
  • Do you also have a dual boot system with Ubuntu and Windows, and if so, do you also experience this problem (at home/work or wherever you access the Internet through your router) in Firefox on Ubuntu but not in Firefox on Windows? If so, please add this information to your answer--while incomplete, that would still make your answer, telling the OP to check the router, a reasonable answer. (Then go ahead and flag this comment as obsolete.) If your situation is different, though, then I'd say delete this answer and post a new question to get further help with your own (different) problem. – Eliah Kagan May 24 '12 at 03:03
  • Yes, I use Wubi to to dual boot Ubuntu and windows too and the slow internet not only applies to Firefox, but all applications that requires a connection to the Internet. – Kevin May 25 '12 at 03:19

5 Answers5

9

Are you using Firefox? It's dog slow on my PC as well for some reason.

I've installed Google Chrome and Opera - and they just fly.

google chrome

Also - try this as well: (thanks to Ubuntu Geek)

Open your Firefox and type about:config at URL address bar and hit enter. To make a False into True, select the line to change, and double click. On the 2nd option change, right click and select Modify

  • network.http.pipelining > Make it True

  • network.http.pipelining.maxrequests > Make it 8 or 10

  • network.http.proxy.pipelining > Make it True

  • network.dns.disableIPv6 > Make it True

Azendale
  • 11,891
Stann
  • 15,116
  • It works for me. +1. – Tahir Oct 06 '11 at 20:17
  • Sped things up a tun for me. +1 – BenjaminRH Feb 02 '12 at 16:55
  • That's odd, in my experience Google Chrome is significantly slower than Firefox. Opera is a good one too. – NoBugs Apr 27 '14 at 02:11
  • Thanks, I know this is an old question, but I found your answer prety good. For me Chrome has been a big problem, it does not remember my logins and had to re-type all the passwords after each restart. FF is working really good but it was damn slow! – FarhadA Dec 27 '16 at 05:08
4

I have experienced that problem, which I fixed by running my own DNS cache. This will almost certainly speed things up, though who could say definitely the problem you have? I don't know if you have dnsmasq or bind9, but it won't hurt to try to uninstall them. So let's try to remove them, if they exist - replacing them with the dnscache portion of djbdns, killing off any instance of dnsmasq - if running - and removing the BIND start-up script - if it exists.

sudo apt-get remove bind9 dnsmasq-base
sudo apt-get install djbdns dnscache-run
sudo killall -9 dnsmasq
sudo update-rc.d -f bind9 remove

Then we'll need to tell the system to use our cache.

gksu gedit /etc/resolv.conf

Edit the file to look like this example. This file defines which name servers to use, the default domain, and the search suffix. The search suffix makes it possible to run queries using only the hostname portion of a fully-qualified domain name. For exmaple, 'nslookup www' automagically becomes 'nslookup www.example.com' when example.com is the value of the "search" parameter.

nameserver 127.0.0.1      # Use the local resolver first.
nameserver 208.67.222.222 # OpenDNS
nameserver 208.67.220.220 # OpenDNS
domain example.com
search example.com

This is a little fancy, but we need to get the lastest root name servers.

sudo dnsip $(dnsqr ns . | sed -e '/answer/!d;s/\(.*\)NS \(.*\)/\2/') | sudo tee /etc/dnscache/root/servers/@

I think the resolv.conf file is overwritten when we use DHCP. So let's give ourselves a static IP address, removing the software that squashes it, and editing our interfaces file to set up the static IP address.

sudo apt-get purge network-manager network-manager-gnome
gksu gedit /etc/network/interfaces

My interfaces file looks as follows, but modify yours to your configuration.

# Loopback
#
auto lo
iface lo inet loopback

First network card (attached to NAT router, attached to cable internet)

auto eth0 iface eth0 inet static address 192.168.1.254 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1

Now let's just restart.

sudo reboot

Now you are using a local resolver and the latest root servers. This is much, much faster and more reliable than what I happen to get from my ISP, which is so very slow. Does this help the slow-problem you have?

UPDATE

Or - if you don't want to run your own cache (above), and per the conversation below, you could just log into your router and configure it to provide alternate DNS servers, like Google and OpenDNS: 8.8.8.8, 208.67.222.222, 208.67.220.220. This would fix slow DNS also.

  • 1
  • Static IP, just to avoid DHCP changing the DNS?. Isn't it overkill?. Why have you used the interfaces file instead of network manager?
  • – Javier Rivera Jan 13 '11 at 14:43
  • Windows uses the main DNS FIRST. It only fallbacks to the other DNS if the primary fails. What is true is that it keeps using the secondary for a couple of minutes.
  • – Javier Rivera Jan 13 '11 at 14:44