Mark Berry July 8, 2010
What’s the best disk setup on a small business server?
I recently got to play around with some options as I set up a Hyper-V host on a Dell PowerEdge 2900 with a PERC 5/i RAID controller. Here are some things I learned along the way.
RAID 10 Beats RAID 5 – By a Lot
Somewhere I heard that it’s good to keep the Hyper-V host on a separate spindle from the VMs. So I originally set up the machine to put the host OS (Windows Server 2008 R2) on 2 mirrored disks (RAID 1), then use three disks in RAID 5 for the Hyper-V data. I installed SBS 2008 on a fixed 80GB virtual hard disk. It took 3 minutes 5 seconds to boot and 4 minutes 17 seconds to shut down.
Then I read here that, “RAID 1+0 [aka RAID 10] provides better write performance than any other RAID level providing data protection, including RAID 5.” Fast is good! So I dropped the idea of a separate spindle for the host OS (which wasn’t completely separate anyway since it was on the same RAID controller). I set up a RAID 10 using six disks, which means striping across three mirrored volumes. The same SBS 2008 machine booted in 1 minute 43 seconds and shut down in 4 minutes 10 seconds. That means it boots 80% faster! Not sure why the shutdown isn’t faster; maybe it involves more writing to disk, which RAID 10 doesn’t help as much as reading.
16KB Beats 4KB – By a Little
The benefits of adjusting cluster size, also called allocation unit size, are (so far) less impressive.
On my RAID volume, I set up partitions formatted with 4KB and 16KB clusters. I created an 80GB fixed virtual disk on the 16KB host partition, and installed SBS 2008 with a non-standard 16KB cluster size for the client partition (here’s how). That’s what I was testing with above.
I also created a separate SBS 2008 installation on the 4KB host partition, and a matching 4KB cluster size for the client partition. Its boot and shutdown times were just a little slower than the 16KB version.
So in summary we have this graph. The fastest in my test was RAID10, 16KB clusters on the host partition, and 16KB clusters on the client partition:
Cluster Size Considerations
Here a few notes and links on cluster sizes and why you might want to go larger than 4KB in some cases:
- If you want to defragment a volume containing shadow copies, it should be formatted with a 16KB or larger cluster size per MSKB 312067. It’s not clear whether that still applies to Server 2008, but since by default SBS 2008 turns on shadow copies on the system volume, and since 16KB is a little faster to boot and shut down, I decided to go with 16KB.
- Microsoft recommends that Exchange databases be hosted on volumes with a 64BK cluster size. See “Partition Allocation Unit Size” here: http://technet.microsoft.com/en-us/library/bb738145%28EXCHG.80%29.aspx. I doubt that this will matter much for my SBS 2008 installation with only a few mailboxes, but I created a 64KB partition on the host, so I may give it a try.
- Microsoft recommends that SQL databases be hosted on volumes with a 64KB cluster size. See “NTFS Allocation Unit Size” here: http://technet.microsoft.com/en-us/library/cc966412.aspx#EEAA. In addition to SBS 2008, I’ll also be hosting a Server 2003 server to run a legacy SQL 2000 application. I plan to try the 64KB cluster on that.
- Some say you should put the page file on a separate disk and that it should have a 64KB cluster size (no authoritative links here). I could create a separate virtual disk for each virtual machine’s page file, and place that virtual disk on the 64KB host partition. I doubt this would make much difference in my small environment, especially since the page files would still be on the same physical RAID array as their respective system volumes.
Beyond RAID and Cluster Size: Partition Alignment
The other major performance consideration that I came across while researching all of this is the need to align disk partitions to “stripe” boundaries, at least where SQL Server is involved. Fortunately Server 2008 does this automatically for the host partitions. How and whether that applies to client partitions (virtual disks) is not clear—how do you even know if a virtual hard disk starts on a stripe boundary? Some links for further consideration:
Good overview (blog post): Partition Alignment
Authoritative MSDN article: Disk Partition Alignment Best Practices for SQL Server
Enterprise-focused blog post: Disk Partition Alignment (Sector Alignment): Make the Case: Save Hundreds of Thousands of Dollars