June 07, 2007

MacPro disk access performance (take 2)

Apple

In a previous weblog entry I measured the disk access performance on MacPro. Few days ago I decided to change my two 750GB drives configuration from RAID 1 (mirrored mode) to RAID 0 (stripped mode).

I backed up the RAID disk on an external drive and I recreated the RAID setup. To destroy the old RAID disk I had to boot the machine in safe mode (hold down the "Shift" key during computer boot-up). Otherwise DiskUtil would not be able to unmount the drive. After creating the RAID 0 disk, I restored the disk from the backup.

I ran the same commands as I did few months ago:

$ time dd if=/dev/zero of=<file> bs=1024 count=1048576

$ time cat <file> | wc -c

One thing I did notice is that running the cat to /dev/null (as I did in the previous entry) yields a really low number on MacOS X 10.4.9. This indicates a possible optimization in the operating system. I changed the command to count the number of bytes using wc. This adds a negligible CPU load, and probably some inefficiencies in how the stdin data is read by wc, but overall should not influence much the result. Here are the results combined with those from the last run:

DriveRead time (seconds)Write time (seconds)
internal 160GB14.9014.64
internal, software RAID 0, 1.5TB7.6810.65
internal, software RAID 1, 750GB18.0521.94
external, hardware RAID, USB2, 400GB49.4357.30

So clearly setting up a RAID 0 disk improves the performance of your disk! In real life Adobe Lightroom takes a lot less time to start up than before. Other applications may benefit as well from this, but it's too early to tell. My previous recommendation remains: use an external USB or Firewire drive for backups only, and optimize the internal disk system for performance.

Posted by ovidiu at June 07, 2007 10:15 AM |
Comments

The numbers are no surprise since you are doing half the writes as RAID 1. Are you afraid of losing all your data if one of the drives go bad? If you are planning to rely on SMART to tell you when to replace your drive, you could be in for a bad surprise as SMART only tracks a small amount of factors that could lead to drive failure. Of course, when Leopard comes out, you can switch to ZFS.

Posted by: Steve Jenson on June 7, 2007 11:35 AM

You are only testing sequential I/O. Something like Bonnie or iozone would give you a more complete picture.

ZFS rocks. I have it running on my Sun ultra 40 M2 Solaris home server, with 6 750GB drives in a RAID-Z2 configuration, and benchmarked it at well over 160MBps sustained I/Os.

The slow RAID 1 reads would suggest the OS X RAID implementation is not well tuned. It should be able to load-balance I/Os across both drives when reading.

I'm not surprised at the low performance of the external RAID. Software RAID on a 2GHz+ Xeon is always going to be way faster than hardware RAID on whatever wimpy storage processor that's embedded in the enclosure, probably not much faster than a 200MHz ARM. In any case, the latency of going through multiple layers of translation from the system bus to slower intermediate buses to USB to SATA and back is also a big drag on performance.

Posted by: Fazal Majid on June 7, 2007 01:33 PM

Steve, thanks for pointing out the need for monitoring. I did setup the smartmontools (from http://smartmontools.sourceforge.net/).

Fazal, the performance that your filesystem gets is really impressive! On the setup I mentioned, during the recovery from the backup I only got some 12MBps (720GB copied in about 15 hours from the external RAID drive). This rate was severely limited by the external USB drive, which is 7 times slower than the internal RAID 0 for reads.

Once Leopard is out I will most likely upgrade my file systems to use ZFS. It looks like a winner!

Posted by: Ovidiu Predescu on June 7, 2007 10:55 PM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?



 
Copyright © 2002-2016 Ovidiu Predescu.