Saturday, April 17, 2010

Linux tech talk

Since I'm between jobs at the moment, I'm also between laptops. And since Mrs. Poolbar wanted a new (smaller) laptop, we went out and got her a new one, and I took her 2-year-old Toshiba Satellite, which is a great machine but roughly the size of an aircraft carrier. It also had the misfortune of coming with Windows Vista.

As soon as I got all her e-mail, files, pictures and music transferred to her new laptop, I installed Ubuntu Linux 9.10 on the old one. I've used Ubuntu off and on for the past few years and found it to be by far the easiest Linux distribution to deal with. And since it's Linux, it's FREE.

Installation took about half an hour and required only a minimal amount of Q&A, nearly all up front so that once it began the install routine took over and did the rest. The installation was flawless, and much to my surprise, this version recognized every bit of proprietary hardware on the system, including all the external controls for audio volume and media playback (play/pause, reverse/fast-forward, etc.). I'd found with earlier versions of Ubuntu that those things typically didn't work and you'd just have to either live with it or hunt down manufacturer-specific drivers to make them work, which often involved a lot of tedious effort.

Boot time is unbelievably fast, especially when compared to most Windows-based systems. The laptop goes from a powered-off state to fully up and usable in about 60 seconds.

Ubuntu installs Firefox as its default web browser, but since I'd become fond of Google's Chrome browser, I installed that one and set it as the default. I noticed right away that page loading was unbelievably slow. So I tried pulling up some pages with Firefox, and observed the same behavior. But when I ran network speed tests, the throughput was right where it was supposed to be. Further confusing me was that, once a page finally loaded, embedded YouTube and other video clips loaded in a snap. I obviously wasn't having a network performance problem, so I started paying closer attention to what was happening when loading a web page.

I noticed almost immediately that the status bar of the browser would get stuck on "resolving host" for extended periods of time. Now, the DNS settings coming from Comcast had never been a problem in the past, and didn't seem to be an issue for any other computers in the house. It had to be a problem with how DNS was implemented with this version of Ubuntu Linux.

This morning I finally got fed up with the problem and started poking around on the Ubuntu forums, and came across this discussion thread. As I suspected it was a DNS issue, but only because of Ubuntu's implementation of IPv6. From the discussion thread:
It has to do with DNS lookups via IPv6 occuring before DNS lookups via IPv4. So the workstation (or app) has to timeout on the IPv6 request before it will make a new request on IPv4. OpenDNS gives an immediate response for the AAAA record query which eliminates the timeout problem.
In short, most DNS servers right now only resolve to IPv4, and not to IPv6. But since Ubuntu first attempts an IPv6 lookup, that request has to timeout before the IPv4 lookup can occur. The OpenDNS fix mentioned in the quoted comment is described here, and after making the changes web pages are loading nice and fast.

At least I didn't have to deal with firmware cutters this time around.

1 comment:

Mark said...

There's also Google DNS

Check for "DNS pre-fetch" settings in Chrome, that too can slow it down.