Inert Detritus The Internet's dust bunnies

Posted
3 September 2009 @ 12am

SSDs and you: my dual-drive setup

I’ve been run­ning a dual-dri­ve set­up on my new Mac­Book Pro for the past two months. Here’s a bit of info about how I’ve got it set up, and how it’s work­ing for me

A quick introduction to SSDs

The vast major­i­ty of a HD’s time is spent trav­el­ing from bit A to bit B: read­ing or writ­ing small amounts of data is fast, but get­ting the read/write heads to where it needs to be takes for­ev­er, in com­put­ing terms.1 Sets of bits that are far­ther apart on the plat­ter take longer to reach: for exam­ple, dupli­cat­ing a file on one disk takes much longer than copy­ing it to anoth­er disk, because the heads have to move to where the file is, read some bits, move to where there’s free space, write some bits, and repeat hun­dreds of times.

SSDs have a con­stant access time, regard­less of what bits you ask it to read or write: read­ing two phys­i­cal­ly adja­cent blocks of a song is just as fast as read­ing a block of data for an appli­ca­tion fol­lowed by a block of data for a download.

It does­n’t mat­ter if an SSD beats a spin­ning plat­ter HD by inch­es or miles for sequen­tial read and writes: the real mag­ic is the through­put and speed of ran­dom reads and writes.

Only big media files, like pic­tures, music, and videos, can typ­i­cal­ly be sequen­tial­ly read and writ­ten.2 The rest of the sys­tem, from OS libraries to appli­ca­tion bun­dles and pref­er­ences, are scat­tered across the disk. When you launch an app, OS X tries in a very short amount of time to read the app’s bina­ry, open any libraries the app needs to run, load any addi­tion­al app resources it needs, and read its pref­er­ences and oth­er appli­ca­tion data. None of those bits sit near each oth­er on the dri­ve, so it takes a lot of back-and-forth hard dri­ve seek­ing to get every­thing read in and ready to go. SSDs don’t have to pay any time penal­ty for ran­dom­ly choos­ing two bits to read, so app launch­es are light­ning fast.

The setup nitty gritty

I did this to my mid-2009 15″ Mac­Book Pro. I upgrad­ed the built-in HD to a 500 GB, 7200 RPM Sea­gate dri­ve. I bought an Optibay3 and an 80 GB Intel X25‑M and installed them myself. The install was easy: take 10 screws out of the bot­tom case to expose the guts of the lap­top, and remove three more inside to swap out the opti­cal dri­ve for the SSD car­ri­er. Close it back up, for­mat the dri­ve, and you’re ready to go.

Why two drives?

I want­ed an SSD for the ludi­crous speed increas­es, but I have a few hun­dred giga­bytes of pic­tures, videos, and music, and no one man­u­fac­tures (afford­able) 500 GB SSDs just yet. Instead of mov­ing lots of that media off the machine and onto an exter­nal dri­ve, I’ve split my filesys­tem set­up between the two dri­ves. I moved as many of the more-ran­dom­ly-read bits onto the SSD as pos­si­ble (the base OS, /Applications, and espe­cial­ly ~/Library), and kept my user’s Music, Movies, Pic­tures, Desk­top, and Down­loads on the spin­ning plat­ter dri­ve, where bit stor­age is cheap and longer seek times don’t mat­ter. By keep­ing the entire OS and the vast major­i­ty of my user’s home direc­to­ry on the SSD, boot times, login times, and app launch times are all large­ly the same as an SSD-only sys­tem, but I still have plen­ty of capac­i­ty for large down­loads of videos, pic­tures, or music, and can still work and use all my media while on the go. It’s the best of both worlds.

Dragons ahead

Get­ting an already-installed OS prop­er­ly copied to the SSD was tricky: I hacked a SuperDuper script to copy over my 500 GB boot vol­ume, minus the above paths and a few oth­ers, and sym­link over what I did­n’t copy. It was tricky, and this is a good time to make sure you’ve got an up-to-date SuperDuper back­up of your boot vol­ume some­where: I had to restore the 500 GB dri­ve from back­up once when I typo’d a path and it thought I meant /Music and not ~/Music.

A spe­cial note for any­one won­der­ing about how OS X installs han­dle a dual-dri­ve set­up: I haven’t tried a Leop­ard Archive and Install on this machine, but I can’t think of any rea­son it would­n’t work, as long as you check the box to pre­serve Users. On Snow Leop­ard, I’ve done sev­er­al OS upgrade installs since set­ting this up, and have had zero problems.

Results! I demand results!

I ini­tial­ly did­n’t copy my user over at all, but the sys­tem was­n’t much more respon­sive than a spin­ning-plat­ter set­up: though apps and the base OS were on the SSD, there was still lots of dri­ve thrash­ing when load­ing pref­er­ences and appli­ca­tion data. The biggest speedup in login and app launch time came from putting ~/Library on the SSD: ~/Library/Application Support and ~/Library/Preferences are hit heav­i­ly by apps on launch. I also moved over all of ~/Music except for the actu­al iTunes Music fold­er: hav­ing the iTunes Library file on the SSD great­ly improved iTunes launch times and song meta­da­ta updates.4

Right now, only a few spe­cif­ic appli­ca­tions access the 500 GB dri­ve: iTunes (and only when play­ing songs), Aper­ture, and any copy oper­a­tions to/from ~/Desktop or ~/Downloads.

Hacks

Since most of the files used by my sys­tem are on the SSD, sudo pmset -b disksleep 1 is my new best friend. This Ter­mi­nal com­mand sets the disk sleep time­out while on bat­tery to 1 minute: most of my time on bat­tery is spent with the SSD pow­ered and the Sea­gate dri­ve spun down. I’ve seen a big improve­ment in bat­tery life the past weeks as a result.5

Was it good for you too?

This con­fig­u­ra­tion was a bit tricky to get set up, but it was very much worth it. OS boot, login, app launches…almost every dai­ly oper­a­tion on the machine is light­ning fast,6 and I did­n’t have to make any com­pro­mis­es with what music or pho­tos I keep on the machine. From now on, I’ll be mak­ing sure that any machine I use day-to-day as my pri­ma­ry sys­tem is run­ning on an SSD.

  1. HD seek and rota­tion­al laten­cy times are usu­al­ly mea­sured in mil­lisec­onds: a ten mil­lisec­ond seek time burns 20 mil­lion CPU cycles on a 2 GHz proces­sor. Entire empires can rise and fall in the time it takes those plat­ters to spin and the read/write heads to move []
  2. assum­ing no file frag­men­ta­tion on the dri­ve []
  3. Fras­er Speirs got a Max­Con­nect kit for his set­up []
  4. the com­put­er seems to write changes to the library file at the same time as the actu­al media files. Hav­ing them on sep­a­rate dri­ves elim­i­nat­ed the typ­i­cal disk thrash­ing this caus­es []
  5. If you install the Devel­op­er Tools, check out Spin­down HD in /Developer/Applications/Performance Tools/CHUD/Hardware Tools/ for an easy way to know if the dri­ve is asleep or spin­ning. []
  6. even OS rein­stalls! []

10 Comments

Posted by
Justin M.
3 September 2009 @ 8am

Wow, this sounds like an inter­est­ing set­up. I’ve been tempt­ed to get an SSD, and may even go with some­thing like this, once my war­ran­ty’s past for this new 17″ MBP.


Posted by
Jake
4 October 2009 @ 11am

Thanks for the details, espe­cial­ly regard­ing SuperDuper. At some point I may install an SSD in my iMac and move my pic­tures, videos, and music to an exter­nal FireWire dri­ve, and I’m glad you put all this infor­ma­tion in one spot.


Posted by
Melanie
15 December 2009 @ 8am

Thanks for a great arti­cle. I have a brand new MBP sit­ting here and I’m sort­ing through how to tack­le the set­up. I need­ed all the info you’ve shared here and even some tid­bits from your oth­er posts. Keep it up — I enjoy your stuff and you write very well! Cheers.


Posted by
Justin M.
28 January 2010 @ 11pm

I’m still intrigued by this and count­ing down the days until the end of March when my war­ran­ty is up. How are you lik­ing it some months later?


Posted by
Christopher Bowns
29 January 2010 @ 1am

Still lov­ing it. Bat­tery life is neg­li­gi­bly impact­ed unless I’m active­ly using both dri­ves. I have all the large stor­age advan­tages of the HD, and all the speed advan­tages of the SSD. I’ll be doing this set­up until SSDs are large and cheap enough to hold all my bits.


Posted by
Matt
24 February 2010 @ 8am

Re: sudo pmset ‑b disksleep 1 : Enter­ing a com­mand on the ter­mi­nal does not con­sti­tute a hack.


Posted by
Jan R.
24 February 2010 @ 2pm

I’m think­ing about try­ing this set­up with my old Mac­Book (white). I cur­rent­ly have a 500 GB HD with Snow Leop­ard installed. Could you elab­o­rate a lit­tle on how to make this set­up work, like for exam­ple the SuperDuper script you used? And also how to make the changes you men­tioned in the “RESULTS! I DEMAND RESULTS!” paragraph.


Posted by
Jason
26 February 2010 @ 4pm

Sounds like you put the SSD in the Optibay enclo­sure??? Would­n’t this have been sim­pler (not required the SuperDuper hijinks, etc.) if you had put the 500GB plat­ter in the Optibay, installed the SSD in the stan­dard HDD slot, rein­stalled the OS, and then moved the few items (music library, pho­tos) over to the Optibay drive?


Posted by
Christopher Bowns
28 February 2010 @ 9am

@Jason: That would have required slight­ly more work, actu­al­ly; in my cur­rent con­fig, the HD is still in the fac­to­ry installed spot, and I just did a CD —> SSD swap. The data copy­ing would have been exact­ly the same as well.

@Jan: I’d rather not; it was a very hacked togeth­er SuperDuper script, and the changes required to split my user data across the dri­ves is some­thing you should be com­fort­able doing with­out hav­ing me a write a sec­tion called “Here’s what a Ter­mi­nal com­mand is”. Sorry.


Posted by
Josh Barfield
20 April 2010 @ 1pm

I know I’m late to the game, but I’m pret­ty much con­vinced. I fig­ure I have anoth­er year and a half in my 2.53GHz C2D 15″ MBP. The invest­ment seems worth it for the speed increas­es. I think I’ll put the SSD in the Optibay with a fresh OS install and then sym­link every­thing after the fact.

Excit­ing to hear about the speed increas­es. Look­ing for­ward to it!