How can I good performance from an OSX install on a USB stick?

2

I installed OSX on a USB stick, using a HFS+ filesystem. Although the OS is fully functional, it is incredibly slow, with frequent spinning wheel cursor.

I am using the fastest (and most expensive) USB2 flash stick I could find: Corsair Flash Voyager GTR, which is rated as 28MB/s write speed, which should be plenty. With it, I boot a 2007 mac mini, which has a USB2 interface.

My suspicion is that the slow performance is caused by the fact that there may be no write cache. Is there any way I can tell OSX to cache the writes to the USB stick, and use a large chunk of RAM to cache these writes?

CORSAIR FLASH DISK:
  Capacity: 31.62 GB (31,620,931,584 bytes)
  Available:    14.51 GB (14,508,220,416 bytes)
  Writable: Yes
  File System:  Journaled HFS+
  BSD Name: disk1s2
  Mount Point:  /Volumes/CORSAIR FLASH DISK

Bram

Posted 2011-07-19T21:54:37.837

Reputation: 121

Answers

2

I think the most you can do is as follows:

  1. Get an ultra-fast USB drive (sounds like you've done that)

  2. Format it with a non-journaled File system (not a great idea for stability, but will speed things up)

  3. Disable swap (not sure how to do this is OSX, but there must be a way)

Regardless, USB 2.0 (60MB/s), is fundamentally slower than SATA 2 (~275MB/s).

James T Snell

Posted 2011-07-19T21:54:37.837

Reputation: 5 726

2Thank you for the tips. I managed to disable the journaling with the command '/usr/sbin/diskutil disableJournal /Volumes/CORSAIR\ FLASH\ DISK/' and then disable the swapfile with the command 'launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist'. It is a little faster now, but still not where I would expect it. I don't think a 2007 mac mini HD is much faster than the corsair flash. – Bram – 2011-07-19T23:21:29.587

Even a slow laptop drive like the one in your Mac mini is definitely faster than even a high-quality a USB flash drive. – Coxy – 2011-07-20T00:25:08.713

@Bram - as you can see from the last line of my post, USB 2.0 is fundamentally slower than SATA2. Now if you have the world's worst SATA drive and the best flash drive - maybe they'd be about equal, but I really doubt it. SATA wins. – James T Snell – 2011-07-20T15:21:36.097