Archive for the ‘MacBook’ Category

How Much Is Your Data Worth?

Saturday, October 27th, 2007

Backups are one of those things you only take seriously after you experience serious data loss and realize the cost, monetary and otherwise, of losing files. In my case, I started thinking very hard about backups last year when a new hard drive in my MacBook died after a few weeks. I even had a backup, but it was incomplete and a month out of date. It was then I realized that my backup approach was haphazard, and not indicative of how important my data was to me.

Now I’ve decided that a good way to approach the problem is to imagine that one morning, you boot your computer and all of your files are gone. How much would you pay to get your data back? $100? $500? $1000? Without a backup strategy, you might find that when a thief or a malfunctioning disk head separates you from your data, no amount of money will bring it back. Only with some amount of planning can you have any control over how much data recovery will cost.

The types of failure modes you may have to deal with include:

  • Catastrophic hardware or software failure: Your hard drive, computer, or software suddenly and without (much) warning destroys some or all of your data. Moreover, it is obvious when this failure happens, so you can take immediate action. This is probably the most common failure, and is the first thing to be addressed by a backup system.
  • Theft: Someone steals your laptop, or breaks into your house and steals your computer.
  • Physical Disaster: Fire, flood, dropping your laptop on the pavement, backing over it with a car, etc.
  • Silent corruption: Malfunctioning software or hardware might corrupt data too slowly for you to notice immediately.
  • User Failure: This is when you accidentally delete a directory, overwrite an important document, or otherwise make some kind of localized, preventable mistake.

Combating these problems require balancing a number of backup tradeoffs:

  • Frequency: How often you backup determines the amount of recent data you will lose when a disk fails.
  • History: The number of backup revisions you save determines how quickly you need to discover the data loss. Disk failure and natural disasters are immediately obvious, but silent corruption, and even user failure, might take a while to identify.
  • Distance: The further away your backup media is from your computer, the less correlated backup failure is with the data loss event. Hard drive failure is very localized, but a thief will steal your entire laptop bag, including the backup drive in the side pocket. Fire can potentially destroy all devices (backup and computer) in your home, or even a larger area.
  • Convenience: You are more likely to backup if it is fast and easy to do. You also want to be able to restore your files quickly and get back to work.

It is interesting to note that there is interplay between these factors. High frequency backups need to be paired with deep history, or you will not be able to recover from silent corruption and some kinds of user failure. Distance and convenience are usually inversely related. Online backups put the storage media very far away, but can be less convenient to restore due to limited network bandwidth.

After balancing these factors, I have some suggestions for people with Mac laptops or desktops. You should consider these stages, stopping whenever you hit the value limit of your data. That is, stage 1 is the most important, then stage 2, and finally stage 3.

Stage 1: Bootable External Hard Disk (~$150)

Buy an external 3.5″ Firewire hard disk that is at least as big as the hard disk inside your computer. For most people, this should cost no more than $100-$150. I suggest Firewire since all Macs in the last 5 years can boot from an external Firewire disk. Intel Macs can now boot from USB 2.0 disks as well, but Firewire in my experience still performs better. Don’t skimp on the size either! Disks are cheap these days, so there is no excuse for not backing up your entire computer.

Purchase SuperDuper! for $28, or download Carbon Copy Cloner. CCC is free, but I haven’t tried out version 3.0, so I can’t comment on whether it has solved the usability problems with 2.0. I know SuperDuper! works, so that’s why I still recommend it.

Now use SuperDuper! (or CCC) to make bootable, full disk backups of your computer. Both programs have backup modes which quickly refresh the backup by only copying changed files. After your first backup, later backups will probably only require 20-30 minutes to complete. Most importantly, if your disk fails, you can boot your backup and keep working while you replace the hardware. If the whole computer is shot, you can boot your backup disk on another Mac and still keep working. This is also a great thing to have when you perform major software upgrades.

A bootable, full disk backup is easy to do, and covers probably 80% of possible problems. You should keep the disk close to your computer desk, but only plug it into the computer during the backup. This will isolate the backup media from transient software problems, or other bugs, that might affect disks connected to the computer.

Stage 2: Online Backup ($60 + friends, hopefully free)

The two major problems with the bootable disk backup is a lack of history, and a lack of distance. Without history, you can only recover files damaged since your last backup. That is sufficient in the case of sudden disk failure, but not so good when you realize you corrupted your photo database a week ago. And, if you keep your backup disk nearby for quick and easy backups, disaster may strike both your computer and backup disk at the same time.

To mitigate both of these risks, I’ve concluded that online backups provide a sensible tradeoff. In particular, CrashPlan has impressed me with an attractive, simple, cross-platform program that does almost exactly what I want in a backup utility. Unlike some other online backup utilities, CrashPlan lets you save your backup data (in compressed and encrypted form) on their servers and/or your friend’s computers. They don’t even have to pay for the program if they just store backups for others. You only buy licenses for computers that you actively backup. Note that only the $60 version of the program supports any kind of version history, which I consider essential in this case.

You should check out the feature details. Perhaps the smartest feature is the emphasis on diverse backup destinations. If you save your data on several friends computers, you don’t have to worry so much if one of them happens to be offline when you need a backup. Additionally, when restoring, the software can stream your data from several sources at once, so if you have lots of friends, your restoration will go faster. Of course, if you want at least one stable, always available backup destination, you can store data on the CrashPlan server for $0.10/GB/month, with a $5 minimum.

So in stage 2, the recovery strategy is: backup your entire computer to the bootable external disk, and continuously backup your irreplaceable files (documents, photos, etc) with CrashPlan to your friend’s computers. Then, if your hard disk dies, you first go to backup disk, and supplement with the more recent files saved online. If your external backup disk is stolen/destroyed/lost, then at least you can recover your irreplaceable files, even if it means you are having to download them for a week.

(Aside: I haven’t yet decided how to fit Time Machine in 10.5 into this strategy. Time Machine provides revision history, but requires an external drive plugged into your computer. That doesn’t provide any backup distance, and it isn’t clear how this will work with a laptop, where I don’t want to have any disks plugged in most of the time.)

Stage 3: Offsite External Backup Disk ($100)

This extension is pretty simple: Buy a second external disk, and do a full, bootable backup to it once a month. Store the disk somewhere away from your computer and home, like at school or work. Then, if your main backup disk is destroyed or stolen, you can still retrieve the offsite backup disk, and then supplement it with the last month’s worth of files from the online backup.

Conclusion

After reaching stage 3, I decided my paranoia had been satisfied. There is a clear recovery plan for all likely failure scenarios, and the cost is very reasonable. Nominally it only requires $300 for this kind of peace of mind, but it can even be cheaper if you have some spare disks laying around (as I did) that you can put into external Firewire enclosures. Considering how much of my work (and leisure) involves my laptop, I consider $300 a pretty reasonable price for my data.

Whining about the MacBook

Monday, August 28th, 2006

When the MacBook Pro came out, there were various reports about a “whine” that could be heard. I was kind of confused what this meant, and before buying my MacBook, I went to a store to do some investigating. The MacBook was not audible over the ambient store noise, but the MacBook Pro was if I put my head close to the case.

The noise people were talking about was a relatively faint high-pitched noise that reminded me of the 286 my parents had when I was a kid. To more clearly hear the PC speaker beeps, my father installed an external speaker jack to the rear of the case and plugged an external speaker sitting on the desk into it. As an extra “feature”, there was now audible the same faint, very high frequency noise. The noise modulated with the activity of the computer, and I soon learned how to tell if the computer was idle just from the kind of noise it was making. (I don’t know if the sound bothered my father, though. I think playing with too many electric guitar amps and attending too many loud concerts in his youth might have diminished his high frequency hearing.)

Well, just recently I’ve been working in a very quiet cube farm, unlike my apartment, which is noisy from the computer equipment, and my desk at the university which under a loud ventillation duct. Now I can finally hear a similar noise in my MacBook. I never did figure out precisely what was the cause of the noise in the 286 (RAM activity, external bus?), but the sound is the same on the MacBook. I can tell from experimenting that the sound is anti-correlated with CPU activity. An idle machine makes noise, but a busy one does not (until the fans turn on). That’s a little surprising too me, but the noise instantly becomes inaudible if I start doing something a little CPU intensive. Similarly, if I use the processor control to disable one of the cores, the noise also disappears as the load on the remaining core goes up.

Now that I can recognize it, the sound is kind of annoying in the environments in which it is audible. The anti-correlation with CPU activity does make me wonder if Apple could possibly eliminate it with some sort of firmware or kernel patch to change the idle behavior of the CPU. Disabling one of the cores manually when not needed is a very effective, but awkward, solution. It unfortunately has the side effect I mentioned earlier of shortening the battery life slightly.

MacBook: Review

Saturday, August 19th, 2006

For easy access, here’s all my MacBook review posts:

In summary: Reasonable price if you buy upgrades at Newegg/Fry’s, damn fast, a little warm, and be careful with the battery usage.

MacBook: Batteries, Power and Heat

Saturday, August 19th, 2006

The question of power consumption and the heat profile on the MacBook is a fairly complicated one, so I’ve saved it for last. Clearly, this is the limiting factor for these computers, even more than size or weight. It’s somewhat similar to the problem in state-of-the-art fighter jets: the airframe could handle very high acceleration maneuvers, but that would render the pilot unconscious. The analogous problem in laptops is to make a fast machine that gets more than 30 minutes of battery life and won’t burn a hole through your desk (or pants).

Battery capacities increase much more slowly than CPU power consumption. The 12″ iBook battery holds 4400 mAh of charge, and the MacBook battery holds 5200 mAh of charge. However, the MacBook battery now has to feed a dual core CPU, brighter screen, and a 5400 RPM hard drive. As a result, the amount of time you get on one charge can vary by a factor of 3. Just watching the “time left” estimate in the menu bar, I’ve seen things like:

  • 1:45 - 100% load on both CPUs, i.e. “make -j2″ or running Handbrake.
  • 2:30 to 3:00 - Watching a DVD or H.264 movie in VLC
  • 4:30 - Writing this blog post with the screen turned to 80% brightness
  • 5:30 - Sitting in a meeting with my screen at min brightness and only occassionally using it to check the agenda.

I have not done rigorous full-discharge tests in any of these scenarios, so I don’t know how accurate these estimates are. I did calibrate my battery sensor as per Apple’s instructions, so these numbers probably aren’t too far off.

The MacBook and MacBook Pro come with lithium polymer batteries, which are more durable variants of the lithium ion batteries used on the iBook (and most other laptops). Hopefully, this will make them slightly less likely to explode, but the total capacity still degrades quite significantly with use. My battery has had 52 charge cycles and is now at 96% of its original capacity. You can monitor (and even record) your battery capacity with coconutBattery, which now works on the MacBook series of laptops.

You might be wondering what power management options you have, and it turns out there are even fewer knobs than before:

  • Time until computer sleep
  • Time until display sleep
  • Put the hard disks to sleep when possible?
  • Dim display before sleep

The processor speed option from the G3/G4 (which let you select Reduced, Automatic, or Highest) is gone. Based upon the previous load tests, it seems that the Intel Core processor is always in Automatic mode, dynamically adjusting its power usage according to the CPU usage. In general that seems to be best, however it was nice on the G4 to be able to set Reduced to ensure maximum runtime. On the MacBook, your best strategy for extending your battery life (after using the few options available in the Energy Saver window) is to take a look at your load using top. Killing unnecessary processes that are using CPU will directly help the power situation. For example, I discovered that idle virtual machines in Parallels can still use 25% CPU, and inexplicably, Parallels seems to use about 5-7% CPU even when the virtual machine is suspended. (This may be a sampling error in top, though.)

If you install the CHUD package in Xcode, you can also put a processor control into your menu bar that lets you disable one of the two cores on the fly. I naively thought that disabling a core might let me reduce power usage, but in fact it had a small negative effect on battery life. Switching a core off just moves the load onto the other core, which tends to make the laptop run a little hotter and use the fans more. Splitting the load over more cores seems to be the most power efficient approach.

Amazingly, Apple was able to keep the power adapter on the MacBook (unlike the MacBook Pro) to exactly the same size as the iBook adapter. At least, this seems amazing until you try recharging your laptop under high load. The power adapter can’t supply enough current to charge the battery at the fastest speed if you are also running the laptop at maximum load. So if you need to charge your battery in a hurry (like in an airport), keep your CPU usage to a minimum.

Finally, there is the heat question. Without a doubt, the G4 iBook gave me unrealistic expectations. It was very cool and the fan almost never ran, but that was because the CPU was so underpowered. The MacBook is definitely a little warmer and uses the fan more in normal usage. (Recently there was a firmware update to change the fan behavior to make it stop cycling on and off when the laptop temperature hovered around the fan’s turn-on threshold.) If you max out both cores, the fans will come on full blast and sound like a handheld vacuum cleaner. In this situation, it is pretty uncomfortable to keep the MacBook on your lap, and you will probably need a desk. Otherwise, it isn’t so bad, but definitely not as good as the G4.

So in summary: Intel is pretty clever about their power management, but on average you’ll get about as much battery life as on a G4 iBook. The variability depending on load will be much greater, so watch your pants when you kick on that parallel code build!

MacBook: The Apple Remote and Front Row

Thursday, August 3rd, 2006

I’ll admit that initially I thought the IR remote that Apple includes with all of its Intel machines was a silly gimmick. Perhaps I could be convinced that it made sense for the Mac mini, which looks like it was made to go under a TV. But a laptop?

I take my skepticism back now. The Apple Remote is really quite handy, especially if you use your computer as your entertainment center as well. I have no TV or stereo, so my computer is my DVD player and my music player. The remote lets me kick back (literally) and watch a movie without having to use the mouse or keyboard. It looks like an Apple Shuffle, almost:

Apple Remote

Front Row is the Apple program which receives commands from the remote. Normally, you can only use the remote to turn the volume up and down with the +/- keys. If you press the Menu button, Front Row starts and provides you with a menu of options. The Apple site has a page on Front Row with some animations which show how the interface operates. If you have looked at MythTV, it seems very similar. Big fonts and large shiny eye-candy.

A great program that makes Front Row even more useful is HandBrake. HandBrake is a simple GUI interface which lets you transcode your DVDs into MPEG-4 format. It really is very easy to use, and provides several nice features:

  • A queue which lets you define several jobs and then start running them sequentially. If you are ripping DVDs of a TV series which have several episodes on one disk, this lets you rip and encode each episode to a different video file.
  • Multithreaded encoding - Use both cores to get the video compression done faster. At 1000 kbps with the H.264 codec, I can encode nearly at real-time with both 1.83 GHz cores.
  • Various options for bitrates, cropping subtitles, etc. - I haven’t played too much, but the default 1000 kbps rate is indistinguishable to me from the original DVD, and fits a 2 hr movie in about 1 GB.

With the help of HandBrake, you can easily put many of your DVDs into the movie folder and the watch them fullscreen with Front Row.

Of course, the next thing you’ll want to do is use the remote for other programs. There are a few bindings to other apps, mentioned here. In traditional Apple style (make the common case ridiculously easy, and to hell with the rest), there is no generic way to interface the remote with other programs besides these. However, there are several 3rd party apps (not free, but cheap) which let you do this:

I tried out both briefly, but didn’t really do enough with them to make for a proper review. Both have free trial options, so I suggest you play with them to see what you like.

Entries (RSS)