Quality, lacking

I’m trying to install Office now… The DVD drive sounds like a meat grinder. I popped it and verified that the disk was in properly, and that there’s no junk on it (e.g., a label only on one side of the disk). It’s also not getting scratched. All I can imagine, though, is that the disk was manufactured slightly warped/lopsided… Not enough to be visible, but enough to cause it to run off-balance and make me worry that it’s going to blow up.

So here I am, working with the pinnacles* of modern technology with one hand, and using the other to apply slight pressure on the DVD drive door to keep it in just the right position to keep it from vibrating too badly.

* This is giving my crusty old dual-core system a little too much credit. 😉

Vista on the Thinkpad T60

This is actually more about how I set up my system than about Vista/Thinkpad configuration in particular…

  • “Fix” the file manager (as it’s been ‘broken’ in every version I’ve ever used):
    • In Windows Explorer, Organize -> Folder and Search Options, then click on View
    • I selected “Show hidden files and folders,” because it hides things I need to get into sometimes.
    • Uncheck “Hide extensions for known file type.” I never saw any benefit to having this on, but there is a big downside: “virus.jpg.exe” has a .exe file type, so it’ll “hide” the .exe. Huh, virus.jpg? Well, good thing it’s a picture file and not a program, so let’s open it!
  • Download and install Firefox 3 beta
  • Download and install Pidgin, a multi-protocol IM client
  • Let WIndows pull down its myriad updates…
  • Get the Thinkpad drivers as needed; I recommend at least getting the BIOS update (no apparent benefit, but it’s the latest), ThinkVantage Active Protection System (“TPShocks”), and the UltraNav drivers (for the scrollwheel functions). There are others, but I didn’t feel like downloading everything under the sun. The catch here: you have to actually read the directions. You can run the file you download, and it’ll seem to “install” without errors, but nothing happens. The directions explain that you need to run some additional steps, which it’ll walk you through. Oh, video and monitor drivers can’t hurt, either.
  • I created shortcuts (find them in the Start Menu and right-click, “Send to… Desktop (create shortcut)” on my desktop for various programs that I use often but are a pain to find, including Command Prompt (I’m a geek) and “Computer” (the shortened “My Computer” of yesteryear).
  • I’m planning on using something from Eset for anti-virus; the question is whether I want NOD32 (just anti-virus), or Smart Security
  • I disabled User Account Controls and font smoothing, which is apparently ‘controversial’–it smooths text out, but makes it look blurry. At least to some people. Like me. (I re-enabled Font Smoothing, since it looks even worse turned off.)
  • I set the system clock (click on it, “Change Date and Time Settings,” then click Internet Time) to sync to pool.ntp.org. (Unfortunately, you can’t give it a series of servers for optimized performance.)

Vista, 5-Minute Review

When I graduated from college, I lost my license to use Office*, and had various other key things shut off. I was given an opportunity to purchase Vista (Business Edition) Upgrade and Office 2007 (Enterprise) for $20 each, so I figured I should, since I had no media for XP or Office. And then I remembered I had a spare 60GB partition for Windows on my 160 GB drive from when I’d intended to dual-boot, so I just installed it here. A few thoughts:

  • The install was “easy” but frankly not that great. I’ll dock a small number of points because, unlike the Ubuntu installer, it’s not a LiveCD: I can’t use the system while it’s installing. When your installer takes 20-30 minutes, it’s very nice to have a browser or game or something going. It also seemed to take forever, and at the end, went to reboot, but gave me a “Reboot Now” option, which I took. It never ejected my DVD, nor did it tell me to, so I figured I was supposed to leave it in…
  • …So it booted into the installer agian. I closed it, and got a message that I couldn’t use Windows if I didn’t install Windows. (Thanks… Though I suppose there are people who actually need that message.) And then it warned me that if I cancelled the installation, my computer may reboot.
  • Of course, I wanted to reboot my computer, so I said OK. My computer did not reboot.
  • Everything feels much more polished!
  • It spent several minutes “evaluating [my] computer’s performance” before going away with no indication of what had just happened. (I knew enough to find it, though: a 3.1. This bothers me slightly, since it’s a fairly meaningless number, but I digress.)
  • All of my text is blurry. Yes, I’m at the native resolution. (Which was detected automatically.) I assume it’s related to ClearType (or a lack thereof?), but I can’t find anything about it?
  • I set up wireless very easily. (Well, after I found the icon in the tray.)
  • Windows is obsessed with popping little bubbles up all over my screen. I guess it’s understandable since it’s the first time I’ve run it, though I’d be a lot happier if it didn’t offer to check GMail and my blogs for phishing attacks. Repeatedly.
  • How do I get a command prompt? (No, I’m serious. Is there a ‘cmd’ in Vista?)
  • The default desktop has one icon, the Recycle Bin. I like this uncluttered look.
  • Now I see what everyone was complaining about. Much like it’s obsessed with bubble notifications, it’s obsessed with asking me if I want to give permission to various things. The problem is that I’ll double-click on the clock in the system tray to set it up to sync to NTP, and get asked if I want to allow access to the clock. Yes, I do; that’s why I just tried to change it. Where do I turn this off?
  • Linux and Windows XP let me use the far-right of my touchpad as a scroll wheel. This feature is missing in Vista?

It’s too soon for a thorough review, but I am a fan of first-impressions things. And my first impressions are so-so. Probably a big improvement over XP, but with quite a few irritations.

Oh! I got the upgrade, which means you have to install it over an existing Windows thing. Except it was on another hard drive, so I’m using the well-known quirk where you can install it without a license key, and then “upgrade” that to the exact same version and put in a license key.

Skype

This is really pretty well-documented, but it’s easy to overlook or forget…

Skype, by default, will engage in some sort of peer-to-peer call relaying. If you ever look and see that you have a bajillion network connections open on some strange port, you can almost certainly blame Skype. (Close it and they go away.)

Fight the Smears

The last paper I ever wrote in college was for my Power and Propaganda course, and addressed the propaganda being hurled against Obama. One thing I addressed was that many of the criticisms of him were blatant lies. It’d be like if I started posting here that John McCain said, “Thank God for the Nazis!” and President Bush met with McCain and used “the N-word” to refer to Obama. Total fabrications as part of a smear campaign.

The problem is that they work. I’m going from memory, but if memory serves me correctly, 13% of people in a recent poll said that they thought Obama was a Muslim. Soon it was being reported that he was sworn in on the Qu’ran, too. Of course, the Muslim rumors would soon be contradicted by trying to label him racist because his pastor said some crazy things, and the fact that he was sworn in on the Qu’ran would be refuted by photographs showing him with his hand on the Bible when being sworn in.

Obama Singing the National AnthemThere was also the big row over the photograph of him “refusing to say the pledge,” with some versions of the chain letter or website alleging that he refuses to do it for religion reasons; one even said that he didn’t know the words. In actuality, Obama was singing the national anthem, as a video of the event shows.

There’s another one about him hiding his birth certificate because he’s not actually a citizen. (If you want to get technical, John McCain is the one who wasn’t born in the US… Though it’d be asinine to argue that he’s not a US citizen because he was born on a US military base.)

The Obama campaign has finally launched Fight the Smears, a page refuting the utter falsehoods against him. The latest one seems to be alleging a videotape of Michelle Obama using the word “whitey.” Frankly, I could see this being done in a non-racist manner, but it’s a moot point, because none of the <sarcasm>reputable</sarcasm> sources claiming to have seen / possessing the tape have released it, and because one person has some pointed allegations of exactly where the tape was filmed, most of which seem fabricated.

It’s totally cool with me if you’d prefer to vote for McCain. (Well, I’d still disagree, but I’d at least respect that you had a rational difference of opinion.) Obama isn’t a Muslim, terrorist, or unpatriotic. John McCain isn’t a rapist and he doesn’t eat babies for breakfast. In a time when the truth is so sorely missing, can we please try to stick to reality this election?

On Religion

Today’s Cold Case Files included a bit with a guy who described himself as a devout member of the “religious right.” A poor man, a comparatively wealthy farmer let him stay in his home. The poor, religious person decided that the farmer was mean and shot him in the back of the back of a head with a rifle.

He then disposed of the body, and neighbors approached him to ask what was going on. He fled–taking his Bible with him. He actually hid very well, and was found decades later. Officers said that it was hard to get him to talk about anything other than the saving power of Jesus Christ. He eventually confessed, saying that he felt no remorse for the killing. His reason? He thought the guy was mean, and he was doing the world a favor.

Although I surely remain ignorant about many complex belief systems, could I boldly propose that any time your religion seems to justify killing someone, you’re grossly misunderstanding your scripture? I know the Christian Bible does not condone shooting mean people in the back of a head with a rifle, and I’m pretty sure that blowing up abortion clinics is missing the point, albeit in a very ironic situation. And while I’m not all that familiar with it, it seems that the Qu’ran also warns against blowing up buildings.

It just boggles my mind that religions with basic tenets such as “Love your neighbor as yourself” and “Thou shall not kill” (and the Qu’ran, if I understand it, is similar!) get twisted into promoting such atrocities.

Location Error vs. Time Error

This post christens my newest category, Thinking Aloud. It’s meant to house random thoughts that pop into my head, versus fully fleshed-out ideas. Thus it’s meant more as an invitation for comments than something factual or informative, and is likely full of errors…

Aside from “time geeks,” those who deal with it professionally, and those intricately familiar with the technical details, most people probably are unaware that each of the GPS satellites carries an atomic clock on board. This is necessary because the way the system works, in a nutshell, by triangulating your position from various satellites, where an integral detail is knowing precisely where the satellite is at a given time. More precise time means a more precise location, and there’s not much margin of error here. The GPS satellites are also syncronized daily to the “main” atomic clock (actually a bunch of atomic clocks based on a few different standards), so the net result is that the time from a GPS satellite is accurate down to the nano-second level: they’re within a few billionths of a second of the true time. Of course, GPS units, since they don’t cost millions of dollars, rarely output time this accurately, so even the best units seem to have “only” microsecond accuracy, or time down to a millionth of a second. Still, that’s pretty darn precise.

Thus many–in fact, most–of the stratum 1 NTP servers in the world derive their time from GPS, since it’s now pretty affordable and incredibly accurate.

The problem is that GPS isn’t perfect. Anyone with a GPS probably knows this. It’s liable to be anywhere from a foot off to something like a hundred feet off. This server (I feel bad linking, having just seen what colocation prices out there are like) keeps a scatter plot of its coordinates as reported by GPS. This basically shows the random noise (some would call it jitter) of the signal: the small inaccuracies in GPS are what result in the fixed server seemingly moving around.

We know that an error in location will also cause (or, really, is caused by) an error in time, even if it’s miniscule.

So here’s the wondering aloud part: we know that the server is not moving. (Or at least, we can reasonably assume it’s not.) So suppose we define one position as “right,” and any deviation in that as inaccurate. We could do what they did with Differential GPS and “precision-survey” the location, which would be very expensive. But we could also go for the cheap way, and just take an average. It looks like the center of that scatter graph is around -26.01255, 28.11445. (Unless I’m being dense, that graph seems ‘sideways’ from how we typically view a map, but I digress. The latitude was also stripped of its sign, which put it in Egypt… But again, I digress.)

So suppose we just defined that as the “correct” location, as it’s a good median value. Could we not write code to take the difference in reported location and translate it into a shift in time? Say that six meters East is the same as running 2 microseconds fast? (Totally arbitrary example.) I think the complicating factors wouldn’t whether it was possible, but knowing what to use as ‘true time,’ since if you picked an inaccurate assumed-accurate location, you’d essentially be introducing error, albeit a constant one. The big question, though, is whether it’s worth it: GPS is quite accurate as it is. I’m a perfectionist, so there’s no such thing as “good enough” time, but I have to wonder whether the benefit would even show up.

Building an Improvised CDN

From my “Random ideas I wish I had the resources to try out…” file…

The way the “pretty big” sites work is that they have a cluster of servers… A few are database servers, many are webservers, and a few are front-end caches. The theory is that the webservers do the ‘heavy lifting’ to generate a page… But many pages, such as the main page of the news, Wikipedia, or even these blogs, don’t need to be generated every time. The main page only updates every now and then. So you have a caching server, which basically handles all of the connections. If the page is in cache (and still valid), it’s served right then and there. If the page isn’t in cache, it will get the page from the backend servers and serve it up, and then add it to the cache.

The way the “really big” sites work is that they have many data centers across the country and your browser hits the closest one. This enhances load times and adds in redundancy (data centers do periodically go offline: The Planet did it just last week when a transformer inside blew up and the fire marshalls made them shut down all the generators.). Depending on whether they’re filthy rich or not, they’ll either use GeoIP-based DNS, or have elaborate routing going on. Many companies offer these services, by the way. It’s called CDN, or a Contribution Distribution Network. Akamai is the most obvious one, though you’ve probably used LimeLight before, too, along with some other less-prominent ones.

I’ve been toying with SilverStripe a bit, which is very spiffy, but it has one fatal flaw in my mind: its out-of-box performance is atrocious. I was testing it in a VPS I haven’t used before, so I don’t have a good frame of reference, but I got between 4 and 6 pages/second under benchmarking. That was after I turned on MySQL query caching and installed APC. Of course, I was using SilverStripe to build pages that would probably stay unchanged for weeks at a time. The 4-6 pages/second is similar to how WordPress behaved before I worked on optimizing it. For what it’s worth, static content (that is, stuff that doesn’t require talking to databases and running code) can handle 300-1000 pages/second on my server as some benchmarks I did demonstrated.

There were two main ways to enhance SilverStripe’s performance that I thought of. (Well, a third option, too: realize that no one will visit my SilverStripe site and leave it as-is. But that’s no fun.) The first is to ‘fix’ Silverstripe itself. With WordPress, I tweaked MySQL and set up APC (which gave a bigger boost than with SilverStripe, but still not a huge gain). But then I ended up coding the main page from scratch, and it uses memcache to store the generated page in RAM for a period of time. Instantly, benchmarking showed that I could handle hundreds of pages a second on the meager hardware I’m hosted on. (Soon to change…)

The other option, and one that may actually be preferable, is to just run the software normally, but stick it behind a cache. This might not be an instant fix, as I’m guessing the generated pages are tagged to not allow caching, but that can be fixed. (Aside: people seem to love setting huge expiry times for cached data, like having it cached for an hour. The main page here caches data for 30 seconds, which means that, worst case, the backend would be handling two pages a minute. Although if there were a network involved, I might bump it up or add a way to selectively purge pages from the cache.) squid is the most commonly-used one, but I’ve also heard interesting things about varnish, which was tailor-made for this purpose and is supposed to be a lot more efficient. There’s also pound, which seems interesting, but doesn’t cache on its own. varnish doesn’t yet support gzip compression of pages, which I think would be a major boost in throughput. (Although at the cost of server resources, of course… Unless you could get it working with a hardware gzip card!)

But then I started thinking… That caching frontend doesn’t have to be local! Pick up a machine in another data center as a ‘reverse proxy’ for your site. Viewers hit that, and it will keep an updated page in its cache. Pick a server up when someone’s having a sale and set it up.

But then, you can take it one step further, and pick up boxes to act as your caches in multiple data centers. One on the East Coast, one in the South, one on the West Coast, and one in Europe. (Or whatever your needs call for.) Use PowerDNS with GeoIP to direct viewers to the closest cache. (Indeed, this is what Wikipedia does: they have servers in Florida, the Netherlands, and Korea… DNS hands out the closest server based on where your IP is registered.) You can also keep DNS records with a fairly short TTL, so if one of the cache servers goes offline, you can just pull it from the pool and it’ll stop receiving traffic. You can also use the cache nodes themselves as DNS servers, to help make sure DNS is highly redundant.

It seems to me that it’d be a fairly promising idea, although I think there are some potential kinks you’d have to work out. (Given that you’ll probably have 20-100ms latency in retreiving cache misses, do you set a longer cache duration? But then, do you have to wait an hour for your urgent change to get pushed out? Can you flush only one item from the cache? What about uncacheable content, such as when users have to log in? How do you monitor many nodes to make sure they’re serving the right data? Will ISPs obey your DNS’s TTL records? Most of these things have obvious solutions, really, but the point is that it’s not an off-the-shelf solution, but something you’d have to mold to fit your exact setup.)

Aside: I’d like to put nginx, lighttpd, and Apache in a face-off. I’m reading good things about nginx.