August 18, 2010

Multiple Partitions on OS X - Pros and Cons

Whether to have multiple partitions or not has been a topic of debate for ages... You might think it even predates the invention of storage.

Here, I'll give a rundown of the many reasons why you might want (or not) to have multiple partitions on your OS X hard disk drives.

However, it's important to remember that partitioning is as personal as a computer task can get.

Why? Because every person's usage pattern are unique; Different applications, different storage needs, etc. You get the picture.

As for how many partitions, and what size is right for you, well, only you can reply to these questions.

As with all things in life, there are Pros and Cons... Let's go over them.

Pro 1: Easier backups and management

Keeping the OS separate from your personal data, makes backups easier.
"Cloning" or making an "image" of the OS and Applications is a great way to have your system up-and running, with your specific configuration and tweaks, should something go wrong.
With the huge size of current hard disks, it's impractical to clone very big partitions to optical media.

Also, think about the frequency at which the OS and the Applications you use change.
Now compare that to your iTunes library, your email folders, and your work files.
It's clear those don't change at the same frequency.
Losing a week's worth of OS and application updates, configuration and tweaks is, in most cases, not the same as losing a week's worth of changes on the files you work on.

Pro 2: Reinstall OS without touching your data

If you ever want (or actually, "When you will need") to reinstall your OS (for example, at the next major update), your data can remain untouched.
This doesn't mean you shouldn't back it up... But it will save you from having to restore it.

Pro 3: Improved performance - Less fragmentation

A small OS partition that rarely changes will be less prone to fragmentation than, the one with your data which is constantly being modified and overwritten.
And, while OS X automatically defragments files, there are some limitations to it, like it will only do this on files smaller than 20MB.

Pro 4: Improved performance - Hot File Clustering

As Hard Disk Drives rotate at a constant speed (See: CAV - Constant Angular Velocity), regardless of the position of the Read/Write heads, higher throughput can be achieved from the outer tracks than the inner ones.

Remember how it was much funnier standing on the outer edge of the Carousel than riding the horses near the center ?

Yes, you can thank CAV for that too.


So, keeping your OS on the outer tracks will lead to faster application launches and your system will feel snappier.

The effects of this are so dramatic that it was implemented in HFS+ as an optimization scheme for boot volumes, and it's called "Hot File Clustering".
Under this scheme, the most used ("hottest") files are dynamically selected, defragmented and moved to the "Hot Zone" (the 0.5% outer tracks) of the boot volume.



However, there are some disadvantages too...

Con 1: Requires planning

This is one of the biggest disadvantages.
We are all too eager to get our system up and running and don't want to spend time planning such a seemingly "insignificant" thing.
Or not?

Con 2: Requires understanding your usage patterns

OK, so you've decided you want to plan...
Now this requires gathering replies to some questions:
  • Which applications do you use?
  • How big is their installation footprint?
  • Will it be enough to have just "OS" and "Users"?
  • Or it might be wise to have also an "Archive" for seldomly modified files (where performance is less important, so we can put it in the "inner" tracks)?
  • May be a "Media" volume for music, photos and movies?
As you can see, there are many questions which require some careful consideration.

Con 3: Requires anticipating your Applications needs

Now, this is another tough one.
Even if you do understand your usage patterns, how can you anticipate the storage requirements of the applications you use?
Now, and in the future?
What about the next version of iWhatever?
Will it be distributed on a zillion DVDs and require 400TB?

Let me tell you that there's no answer to these questions...

So, how can you deal with it? Well, we'll do the best we can.
I normally try to estimate the current needs, and factor a 50% to 100% growth.
This should help keeping the file system "not too full" (which degrades performance), and give me enough time to use my system, without having to repartition...

Con 4: Repartitioning is annoying

Yes, doing it right the first time is better than having to backup, go back to the drawing board, repartition and restore.
However, and no matter how good your planning is, you'll eventually hit the strict limit of one of your partitions.

Con 5: There's free space but not on the "right" volume

Accept it, at one point or another, you'll hit the brick wall, with one of your volumes full, and plenty of free space on other ones.
And, yes... This is irritating too.





Having said all this, take in mind that in some cases, you still might want to dedicate a whole drive for a specific purpose.
Good candidates for this might be your digital music library, a Final Cut Scratch disk, an iMovie raw footage repository, etc.


I'll later post my partitioning scheme, for the curious among you...

So, what's your stand on this?
Do the advantages outweigh the disadvantages? What works best for you? Why?

21 comments:

  1. Nice guide!!! Thumbs up!!!

    ReplyDelete
  2. @Melonetics: Glad you enjoyed it !

    ReplyDelete
  3. Interesting. Do you have any comments on a boot partition in osx86?
    I plan to run osx and win7 on separate hdds.

    ps. im a fan of your blog

    ReplyDelete
  4. @Mishal:
    I very briefly described my partitioning scheme in section Disk Partitioning of Installing OS X Snow Leopard - Part Two.
    And I'm working on the next part of this post, in which I describe the specifics of implementing this scheme on OS X.

    Running different OSes on separate HDDs is, in my opinion, the way to go (unless you are on a laptop...)

    PS: THANKS! I'm a fan of my readers ;-)

    ReplyDelete
  5. I tried separating my OS and Users by assigning my user to a firewire volume, by using the "Advanced Options..." in the Accounts panel. It appeared as though it was working great. However, I discovered that not all apps will support the relocated home folder properly.

    For instance, Scribus seems to use an absolute path to the Users folder. Instead of "/Volumes/myvolume/Users/Smitty" it uses "/Users/Smitty" as the home path. Even Komodo Edit exhibited this behaviour. I found no problem with NeoOffice and OpenOffice.

    So, although the idea of separating the OS and Users, etc. into their own areas sounds cool -- to me, at least -- I don't think I would do it in practice.

    Thanks for allowing anonymous posts! :)

    ReplyDelete
  6. Hi Lynx2Mac.
    Info on setting up Symlink to user data, so that OSX "Users" poInts to/reads from the "data" partition would be nice!
    Humph.

    ReplyDelete
  7. @Anonymous: Indeed there are issues with some applications assuming the home directory is always /Users/JohnDoe...

    The post I'm finishing has a TRUE solution for that !
    Mounting the alternative partition under /Users...

    I'm quite busy running the Beta for my Realtek RTL81xx Driver, so couldn't finish polishing the post yet...

    Will finish it soon, so stay tuned...

    ReplyDelete
  8. @Humph: Thanks for your comment...
    Actually, setting a symlink is one of the alternatives, but it brings its own issues (i.e. have to deal with mounting it anyway).

    As I just replied to Anonymous, it's real-soon-now (last famous words)...

    ReplyDelete
  9. Completely agree with Lnx, if dual booting, separate drives are definitively the way to go.
    Currently i have to 40gig sat drives with Win 7 and OSX, with a 500gig partitioned to suit both for storage.

    ReplyDelete
  10. @Sudds: Thanks for your comment and support !

    ReplyDelete
  11. Hey, I also tried to use a different partition on my hard drive for /Users in case an update broke my system. However, I ran into some problems as well. I would be curious how you resolved those. Cheers~

    ReplyDelete
  12. Hey Lnx2Mac I love your blog. Your bios settings helped me acheive a stable 4.0+gHz OC!

    As far as partitioning goes I am a big fan of HDD structure and organization. Here is how my system looks now.

    SSD: Intel X25-M
    HDD: Samsung Spinpoint F3 1TB (RAID 0) {Users folders}
    HDD: Samsung Spinpoint F3 1TB (RAID 0) {Users folders}
    HDD: Samsung Spinpoint F3 1TB

    Backup OS Drive (OS X Journaled - 80GB)
    Backup RAID 0 (OS X Journaled 700GB)
    Win7 (NTFS 200GB)

    So far it seems to be working out for me. When my RAID 0 exceeds 1TB of data I may have to back it up and migrate to a RAID 5.

    ReplyDelete
  13. @Grovestand: Thanks for your feedback !

    Your storage structure looks nice !

    ReplyDelete
  14. I had to laugh when I read this because all of the Cons you listed are Pros in my book.

    Something that forces you to think and plan ahead? That is a pro!

    Anywho, I have 3 hard drives (750GB, 750GB, 500B) and a 60GB SSD. Each of the 750GB HDDs are partitioned into 4 partitions and the 500GB is partitioned into 5. The 500GB disk is my "scratch" disk. I use it for my OS whims (Mac, Linux etc) and as a common storage between Mac, Windows and Linux. I have OSX and Linux installed + "data" disks that are in the same format as the OS where I put things like the iOS SDK and things I don't want to have to redownload.

    I also have a NTFS partition on the disk for scratch purposes in Windows and for storing all my hackintosh info that I might need in Windows (Snow Leopard DVD, etc).

    The SSD is for Windows 7 because I still like it better.

    Also, my laptop has 3 partitions: 50GB, 100GB and 100GB. 50 for Win7, 100GB for programming stuff and steam and 100GB for media.

    I make so many partitions because this way I can easily destroy specific segments of data to install a new OS. This also reduces my chance of me doing something really stupid due to how every drive has to be access separately in Windows.

    ReplyDelete
  15. @Alec: Thanks for your comment !
    You said "I had to laugh when I read this because all of the Cons you listed are Pros in my book. Something that forces you to think and plan ahead? That is a pro!"

    I agree with you on this, but "our book" is not the one everybody reads...

    We are developers and "OS-tinkerers" who enjoy having control of every aspect of our machines.

    Let's say we are not the "common" type of computer users.

    ReplyDelete
  16. Yeah, I know we're not normal, I was just commenting on how clear it is in my book, because I know how unclear it is in my brother's book for example (1x 1TB hard drive: 1 partition).

    ReplyDelete
  17. @Alec: Hehe...
    We are not just on the same book, we are on the same page :D

    ReplyDelete
  18. I'll add another reason why separate partitions for the system and users are good, IMHO.

    Being a Unix head, I prefer file systems that are case dependent (i.e. Foo.txt and foo.txt are two separate file). Unfortunately, many applications don't adhere to this principal (Adobe being a big culprit) and assume drives are formatted case-insensitive.

    By creating separate partitions for Users and the system, you can allow users to be case-sensitive while the system and applications folder are case-insenstive. This is the best of both worlds!

    ReplyDelete
  19. @Dave: I agree it's good for that too !

    My current installations use case-sensitive file systems too... I'm also a Unix-head ;)

    A while back, I had to create a sparse image to be able to get a rebel app running due to case-sensitivity issues.

    ReplyDelete