If you are looking for the epic motorcycle journey blog that I'm writing, please see the Miles By Motorcycle link on the left. I wrote all the software the powers this site and unfortunately did not have enough time before I left to create anonymous blog posting. You have two options. You can contact me and I can add you as a member or you can find me on facebook and post comments there. I'll add a link to each article I post.
  • Slow DNS Lookups in Ubuntu 9.10 (Karmic Koala)
    01/28/2010 11:28PM

    One of the most frustrating things about Ubuntu/Kubuntu 9.10 (and 9.04) is the random but frequent 20 sec DNS lookup delay that happens when IPV6 is enabled. Apparently, the resolver first attempts an IPV6 lookup, even if no interfaces are defined. It will sit and time out, at random, for 20 seconds before attempting the IPV4 lookup.

    There are a number of proposed fixes. One is to turn of IPV6 in firefox. This seems to work for a while, but then fails.

    Here's a link to article about turning off IPV6 in Ubuntu:

    http://www.ubuntugeek.com/how-to-disable-ipv6-in-ubuntu.html

    In grub, to turn off IPV6 edit /etc/default/grub and change

    GRUB_CMDLINE_LINUX_DEFAULT=quiet splash

    to

    GRUB_CMDLINE_LINUX_DEFAULT=ipv6.disable=1 quiet splash

     run

    update-grub

    and reboot.

    It's not clear to me yet whether this actually works around the problem or not. Initially on reboot, opening 20 some tabs in firefox seemed much quicker than before but I did get a long hang once I brought up thunderbird. So it may not be a fix after all. Only time will tell.

    To turn off IPV6 in firefox (which doesn't seem to work around the issue but is probably good to know):

    Enter about:config in the URL bar then and search for:

    network.dns.disableIPv6

    and set it to true.

    Here's a link to a very long bug report discussion on the subject:

    https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/417757?comments=all

    2010-02-03 Update:

    Even with all these changes, I was continuing to get DNS timeouts until I came upon this bug in launchpad (which of course I found /after/ commenting on the bug above, figures:

    https://bugs.launchpad.net/ubuntu/+source/nss-mdns/+bug/94940

    Editing /etc/nsswitch.conf and changing

       hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

    to

       hosts: files dns

     seems to /finally/ get the DNS lookup performance I would expect.

    Update 2010-02-18 - spoke too soon:

    While initial network connection speeds seem to improve from the steps above, it quickly became apparent that there's still a problem with networking. This seems to happen primarily when I do multiple simultaneous network connections.

    Here's a thread on the subject, which may or may not be useful:

    http://ubuntuforums.org/showthread.php?t=1395866&highlight=slow+internet

    Update 2010-02-21 - ok, maybe it's "fixed" now

    Based on a forum post I read somewhere about the latest kernels implementing some standard too stringently, I decided to try to upgrade the firmware for my DLink DI-707 firewall gadget. It had been a firmware version 2.51. I upgraded it to version 2.57. I immediately noticed an improvement in network performance. My initial tests are not able to reproduce the problem I was seeing, but it's too early to tell for sure.


You must be logged into an account to post comments.