Saturday, July 05, 2008

Reinstalled Mac OS X in multiple partitions, again

Past weekend, for some strange reason, I decided to dump all the MBP's hard disk contents and start again from scratch. But this time I decided to split the disk into multiple partitions for Mac OS X, to avoid external fragmentation slowdowns as much as possible.

I already did such a thing back when the MBP was new. At that time, I created a partition for the system files and another for the user data. However, that setup was not too optimal and, when I got the 7200RPM hard disk drive six months later, I reinstalled again in a single partition. Just for convenience.

But external fragmentation hurts performance a lot, specially in my case because I need to keep lots of small files (the NetBSD source tree, for example) and files that get fragmented very easily (sparse virtual machine disks). These end up spreading the files everywhere on the physical disk, and as a result the system slows down considerably. I even bought iDefrag and it does a good job at optimizing the disk layout... but the results were not as impressive as I expected.

This time I reinstalled using the following layout:
  • System: Mounted on /, HFS+ case insensitive, 30GB.
  • Users: Mounted on /Users, HFS+ case insensitive, 50GB.
  • Windows: Not mounted, NTFS, 40GB.
  • Projects: Mounted on /Users/jmmv/Projects, HFS+ case sensitive, 30GB.
Windows had to go before Projects so that the MBR partition table was constructed correctly; otherwise Windows failed to start after installation. The Projects partition holds those small files as well as the virtual machines. And Users keeps all the personal stuff such as photos, music and documents, which are mostly static.

Using this layout, the machine really feels a lot faster. Applications start quickly, programs that deal with personal data such as iPhoto and iTunes load the library faster, and I don't have to deal with stupid disk images to keep things sequential on disk. However, the price to pay for such layout is convenience, because now the free disk space is spread in multiple partitions.

3 comments:

Matthias Scheler said...

Have you considered simply creating a backup with CCC or Time Machine and restoring that to the internal harddisk? That should achieve the same effect than a reinstallation but require less work.

Julio M. Merino Vidal said...

Matthias: I don't have CCC nor Time Machine. Wouldn't I get the same results as when defragmenting the disk iDefrag?

Anyway, any of these are inconvenient because the machine keeps getting slower and slower with regular use, so at some point you have to stop, dump/restore, and continue. Hopefully, with my new setup, performance will remain more or less constant for more time :-)

Matthias Scheler said...

CCC is available for download free:

http://www.bombich.com/software/ccc.html

I don't know iDefrag and cannot judge how helpful it is. I however do know that CCC allows you to copy your system disk to an external harddisk and boot of it afterwards. That should allow you to reformat the internal harddisk without losing data and without a reinstallation.