This is Part 3 in an ongoing series on disk performance. You can read the entire series by starting at the Introduction.
RAID 5 is recommended for read intensive databases where you need to maximize space while retaining fault tolerance. Just like a RAID 10 drive achieving optimal performance depends on the right combination of stripe size, partition offset, and allocation unit size. For this set of tests I used the same hardware as my RAID 10 tests - Test Harness #1, a Dell PowerEdge 2950 (view the test harness specifics here).
Stripe Size & Allocation Unit Size
I’m following the same methodology and conditions as in part 2 of this series. To recap, I used RAID stripe sizes of 4 KB, 8 KB, and 128 KB along with allocation unit sizes of 4 KB, 8 KB, and 64 KB on a partition with a default 32 KB offset. I focused on 8 KB random reads writes, which are the two types of operations SQL server performs on data files most of the time.
Here’s what 8 KB random reads look like:
And here’s what 8 KB random writes look like:
The results are in line with what we saw for RAID 10. A 128 KB stripe size offers the best overall performance. However, allocation unit size makes no difference when using a 32 KB partition offset.
Partition Offset
Now let’s look at how a 64 KB partition offset changes things.
Here’s what 8 KB random reads look like:
And here’s what 8 KB random writes look like:
Interestingly, with a 64 KB offset there’s very little difference between a 64 KB and 128 KB RAID stripe size for both read and write operations.
What about how a 32 KB offset stacks up against a 64 KB offset? Since a 128 KB RAID stripe and a 64 KB allocation unit offered the best performance for a 32 KB offset, let’s go with the same for a 64 KB offset so that we can do an apples to apples comparison of the two.
8 KB random reads:
8 KB random writes:
Just as we saw with RAID 10, a 64 KB offset results in better performance than a 32 KB offset. Put into percentages, using a 64 KB offset results in a 5.7% improvement in IOs/sec and MBs/sec and an 8% improvement in average latency for 8 KB random reads. For 8 KB random writes using a 64 KB offset resulted in a 5.5% improvement in IOs/sec, MBs/sec, and average latency.
Conclusion
As I expected and the numbers showed, using a 64 KB offset results in the best performance. What I was surprised at, however, is how little of a difference allocation unit size made for 64 KB and 128 KB RAID stripes. We’re talking +\- 5 IOs\sec and MBs\sec. On paper that means for a 64 KB offset as long as you go with at least a 64 KB RAID stripe and a 4 KB allocation unit you’re going to be getting close to optimal performance. Unfortunately, although I had two other test harnesses I didn’t get the chance to see if this holds true when you throw more drives into the mix. My guess is with more drives the gap between numbers will become more apparent. Therefore I recommend you play it safe, go on the high end, and stick with a 128 KB RAID stripe, 64 KB offset, and 64 KB allocation unit size for your RAID 5 drives.
Next, in Part 4 I will take a look at RAID 1 performance.
1 comment
Amongst the SQL Server blogs, Kendal Van Dyke’s gets the award for illustration this week, for the third part of his disk performance series, this one on RAID 5 performance.
Log Buffer #135
Post a Comment