vote up 1 vote down star

Hello!

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.

flag
2  
Sounds like a slow DNS server, have you tried with different DNS ? – UK Nov 9 at 14:19
Can you recommend anything other than OpenDNS? – Sirupsen Nov 9 at 16:40
To answer my own "question" about good OpenDNS alternative; Google just launched a public DNS.code.google.com/speed/public-dns/docs/using.html – Sirupsen Dec 3 at 17:49

8 Answers

vote up 4 vote down check

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).

link|flag
1  
Link to the relevant bug in Launchpad: bugs.launchpad.net/ubuntu/+source/glibc/+bug/… – jackem Nov 11 at 21:23
1  
Wait, 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 Nov 12 at 16:31
I'll approve it now. :) However, if anyone got anything to add which might be able to improve further, please leave an answer! – Sirupsen Nov 12 at 17:36
1  
Well... 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 Dec 3 at 3:33
vote up 1 vote down

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

link|flag
I've tried it, unfortunately it doesn't help. – Sirupsen Nov 9 at 20:35
vote up 1 vote down

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.

link|flag
vote up 1 vote down

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.

http://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.

link|flag
vote up 0 vote down

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.

link|flag
Can you explain this pnds stuff? Where do I get it? – Sirupsen Dec 3 at 17:47
vote up 0 vote down

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.

link|flag
vote up 0 vote down

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".

link|flag
vote up -1 vote down

Your router/network card may cause it. Try to play with hosts file, put record like this: sitename ipaddress and check out speed then get back to me ;)

link|flag
After some testing, it doesn't really seem like it has a lot of influence whetever it's added to the hosts file. – Sirupsen Nov 9 at 16:46
1  
However, I do believe it might be an issue at my home only, I've had my computer at some friends before, and then it have seemed to run fine. Also, it seems to work good on XP on the same machine. – Sirupsen Nov 9 at 16:52
The last your sentence may only mean that it is Ubuntu issue and not a hardware, however I had exactly the same issue which was fixed be changing network adapter. – Igor Nov 9 at 16:58
1  
Have you tried in another browser? Please, try in Firefox or an other. – Igor Nov 9 at 17:19
1  
Yeah, same issue. – Sirupsen Nov 9 at 17:55
show 3 more comments

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.