Slow website loading on Ubuntu Karmic

1

1

I've for a little time had the problem, that it took a while for my browser (Chromium) to load websites. It says "Resolving host" for a while, and then eventually loads; but this process can be pretty long. (Usually up to 30 seconds.)

It's not always like this, sometimes it works fine for some time (usually about 10 minutes), and then it begins to do it again. First, I thought switching to OpenDNS would fix the problem, it worked on Jaunty that way (had the problem on Jaunty too, but fixed by switching to OpenDNS). Also, download speed works fine (about 500 kb/s, which is decent for the connection I have). The same problem occurs in Firefox.

Ping to google.com:

sirupsen@puter:~$ ping google.com
PING google.com (74.125.67.100) 56(84) bytes of data.
64 bytes from gw-in-f100.1e100.net (74.125.67.100): icmp_seq=1 ttl=55 time=138 ms
64 bytes from gw-in-f100.1e100.net (74.125.67.100): icmp_seq=2 ttl=55 time=137 ms
64 bytes from gw-in-f100.1e100.net (74.125.67.100): icmp_seq=3 ttl=55 time=140 ms
64 bytes from gw-in-f100.1e100.net (74.125.67.100): icmp_seq=4 ttl=55 time=138 ms

Also, it seems like when I loaded a page i.e. SuperUser.com, it can take those 20-30 seconds to connect the first time, but then I can surf around with normal loading time.

So to sum up: It takes a while to load the host (i.e. SuperUser.com), but then I can surf around on that page with normal loading times, once it connected the first time. Anything else works fine; i.e. Download Speed, Skype, IMing, online games..

Anyone got an idea of what could cause this?

Edit: Tried to reinstall Ubuntu, doesn't fix the issue.

Edit: Disabling Ipv6 Module gives a good improvement, but not perfect.

Sirupsen

Posted 2009-11-09T14:10:43.583

Reputation: 630

I have similar issues with Ubuntu 18.04. I haven't find a solution yet. – Mpizos Dimitris – 2019-12-03T14:33:58.780

2Sounds like a slow DNS server, have you tried with different DNS ? – ukanth – 2009-11-09T14:19:46.800

Can you recommend anything other than OpenDNS? – Sirupsen – 2009-11-09T16:40:07.397

To answer my own "question" about good OpenDNS alternative; Google just launched a public DNS.http://code.google.com/speed/public-dns/docs/using.html

– Sirupsen – 2009-12-03T17:49:57.313

Answers

4

Try disabling IPv6. Some people report having DNS problems when IPv6 support is enabled. You could try disabling it to see whether it makes any difference in your case.

You should be able to disable IPv6 by adding ipv6.disable=1 to kernel boot parameters (editing Grub config in /boot/grub/menu.lstand running sudo update-grub as instructed for example here).

Jukka Matilainen

Posted 2009-11-09T14:10:43.583

Reputation: 2 304

1

Link to the relevant bug in Launchpad: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/417757

– Jukka Matilainen – 2009-11-11T21:23:24.960

1Wait, after some more testing and a router restart, this seemed to have made a huge improvement! However, I wouldn't call it a hundred procent fixed just yet, still got quite a delay from time to time, and it takes a long while to load > 1 tab. – Sirupsen – 2009-11-12T16:31:48.967

I'll approve it now. :) However, if anyone got anything to add which might be able to improve further, please leave an answer! – Sirupsen – 2009-11-12T17:36:24.033

1Well... further improvement wise...

you could get cozy with wireshark; you never know what you'll learn from running captures and looking at the results.

Also take a look at all the options in your router's control panel and turn off everything you don't need (especially Plug-n-Play if it's on). – pbr – 2009-12-03T03:33:47.120

2

This is my setup in NetworkManager set as DNS, 127.0.0.1 as primary and 8.8.8.8 for secondary.

install dnsmasq (sudo apt-get isntall dnsmasq) and run it (sudo dnsmasq).

This will cache your DNS request and make your browsing with Chromium more pleasant.

Also you may want to have the DNS in the cache for more time (increase the TTL), this is not a good practice but if you want to try, but you can try.

https://serverfault.com/questions/113954/how-can-i-override-ttl-of-an-internet-address/114010#114010

Also the correct "disable Ipv6" is this (from launchpad):

start a Terminal session and type:

gksu gedit /etc/default/grub ....then change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash"

then

sudo update-grub

Reboot and network speed should be back to normal.

OmniWired

Posted 2009-11-09T14:10:43.583

Reputation: 133

1

Try turning openDNS back off and using your ISP's DNS again and see if that helps.

Macha

Posted 2009-11-09T14:10:43.583

Reputation: 4 772

I've tried it, unfortunately it doesn't help. – Sirupsen – 2009-11-09T20:35:48.437

1

Well I have the same problem, and I tried all the suggestions above, I changed to OpenDNS disabled IPV6 but it did nit changed a thing. I think there is some kind of a time out in the kernel since I am having the when browsing to a localhost web site I am building. The situation is very bad, I think I would not recommend Ubuntu karmic to any of my friends. Hope that some one at Ubuntu will will check it out, I am using a core-due 2G ram with a fast new 1T sata2 HD with nvidia graphic accelerator. I am monitoring the CPU Usage for a while and it seems that that the latency is not related to the CPU usage.

moshe beeri

Posted 2009-11-09T14:10:43.583

Reputation:

0

I have a Belkin router, and checked the "Security Log". I saw a bunch of lines like this: 02/07/2010 20:42:10 UDP flood (my ip), 32768->> 208.69.32.132(manually specified DNS server), 53 (DNS port) (from WAN Outbound)

Looks like my router was the problem, but I'm not sure yet as I just disabled the "Firewall".

Anon

Posted 2009-11-09T14:10:43.583

Reputation:

0

I had the same problem. My solution is installing pnds with resolvconf. Plus, I use OpenDNS as my dns server in NetworkManager. It seem to work pretty well now. even with chromium-broswer.

kalambus

Posted 2009-11-09T14:10:43.583

Reputation:

Can you explain this pnds stuff? Where do I get it? – Sirupsen – 2009-12-03T17:47:12.793

0

For whatever it may be worth: here is how I "solved" the problem: ... I ditched Chrome and Firefox and switched to the Opera browser (running version 10.10 in Ubuntu Karmic). I couldn't believe how fast this thing is compared to the the other two: absolutely unbelievable!!! I haven't seen any time lag--at all--before pages are loaded. Besides: other than the text-search feature of Chrome (which I think is better than Opera's) I found all the usual enhancements. Give it a try.

user22926

Posted 2009-11-09T14:10:43.583

Reputation: