Disk Partitions

  • UMG Developer (2/22/2011)


    Tom,

    Thanks for the extra information, that is very useful. One question I have is about the stripe size: Is that the stripe size on each individual spindle, or the stripe size across the entire array? For instance on a 10 drive RAID10 array with a strip size of 128 KB that results in a "full stripe size" of 640 KB. (What would be the correct initial offset for that?)

    The standard RAID teminology (see for example Common RAID Disk Data Format Specification, which is probably the nearest thing we have to an agreed standard for RAID) is

    stripe: the stripe across the whole array (including parity and mirror blocks)

    stripe size: the amount of data in the stripe (excuding redundancy)

    strip: the intersection of an stripe with an extent (in the simple cases, an extent is a physical disc)

    So the sizes I was talking about, stripe sizes, are the amount of data in one stripe across the whole array (excluding parity blocks and mirror blocks).

    In the case you describe, a 10 drive RAID 10 array with 128kb strips, the stripe size is 640kb, as you rightly say. (Well, that's assuming that the 1 in 10 is a simple 1, not a 1 MM: in a RAID 10 that is RAID1 MM + 0 one of the ten discs would have to be a spare because there has to be a multiple of 3 non-spare discs, and the rest would be triple mirrored, giving a stripe size 512kb - in 1 MM the first M stands for Three - actually it stands for Multi, but Multi means Three according to the standard 😉 ).

    For good performance, the partition offset has to be a multiple of both the stripe size and of the allocation unit (but sensible people never build systems where the stripe size is not a multiple of the allocation unit , so that just amounts to a multiple of the stripe size; the recommended [required? I don't know which :ermm: :blush:] allocation unit for SQL Server is 64KB; this is of course needs to be a multiple of the disc block size [or sector size if you prefer to call it that]). In your example, the partition offset would need to be a multiple of 640kb - might as well choose 640kb. A sector offset of 1Mb will give poor performance.

    So if you use Windows 2008 (or 2008 R2) and don't want to mess about with specifying offsets, make sure your stripe size is one for which the default partion size works; with some RAID controllers this means picking a number of discs for RAID 10 that is a power of 2, or for RAID 5 or RAID 50 a power of 2 plus 1.

    In theory the definitions for RAID 10 and RAID 50 (see standard reference above) permit the individual mirrored pairs (or triples?) or RAID 5 arrays to be different sizes (so it's more of a pain for the RAID controller to know which strip on which disc a block is in that in the simple RAID 0 case, where the extents are all the same size), and some people have implemented this (or it wouldn't have got into the standard), and when that's been done it may be possible to have a stripe size that's say 512KB on a 5 RAID1 RAID 10 ( or 3 RAID 5 raid 50) array by using some extents that aren't the whole basic virtual disc; but I suspect most RAID controllers don't support it; and I there may be some performance issues too.

    Tom

  • Steve Jones - SSC Editor (2/22/2011)


    You might read this to better understand. I believe this is the stripe alignment of each particular drive as seen by Windows. So potentially the array is not aligned as a whole, not each drive, though each drive should be aligned as best it can be.

    http://msdn.microsoft.com/en-us/library/dd758814%28v=sql.100%29.aspx

    Or to put it more simply: it is each virtual disc presented by the RAID controller to its users.

    Typically each virtual disc will use a number of physical discs which it doesn't share with other virtual discs, and in that case it is common terminology to call each virtual disc an array (and although this is sloppy terminology, I tend to use it myself) but the word "array" ia also used to refer to the complete set of physical discs handled by the RAID controller.

    Tom

  • Tom.Thomson (2/22/2011)


    For good performance, the partition offset has to be a multiple of both the stripe size and of the allocation unit (but sensible people never build systems where the stripe size is not a multiple of the allocation unit , so that just amounts to a multiple of the stripe size; the recommended [required? I don't know which :ermm: :blush:] allocation unit for SQL Server is 64KB; this is of course needs to be a multiple of the disc block size [or sector size if you prefer to call it that]). In your example, the partition offset would need to be a multiple of 640kb - might as well choose 640kb. A sector offset of 1Mb will give poor performance.

    Thanks again, after reviewing things that is what I was thinking, so I will have to give it a try and see what it does to the performance. (At this point I suspect that most of our logical volumes aren't properly aligned.)

    And aligning GPT partitions is even more fun since there are other offsets in front of the actual data partition that you have to account for. (At least if my understanding is correct.)

  • tilew-948340 (2/21/2011)


    That was a tricky question: I don't use window "server" and I know very little about them (my databases are small enought to put on "regular" window"), so for me, "window 2008 R2", and "window 2008"... well... never heard of that :unsure:

    But saying that, I should have guest that you were talking about "servers". Nice question even I don't think I will ever use "alignment on disk partition":alien:

    Properly aligning your partitions can result in up to a 30% performance increase according to some papers I have seen, even in "regular" Windows, so it is probably something you want to pay attention to.

    Windows Vista and Windows 7 both default to aligning at 1MB, just like Windows Server 2008 and Windows Server 2008 R2, so you might be OK depending on your drives/logical volumes. But if you are using Windows XP you need to manually align the partitions to get the best performance.

  • Tom.Thomson (2/22/2011)


    Typically each virtual disc will use a number of physical discs which it doesn't share with other virtual discs, and in that case it is common terminology to call each virtual disc an array (and although this is sloppy terminology, I tend to use it myself) but the word "array" ia also used to refer to the complete set of physical discs handled by the RAID controller.

    This has become less and less the case in SAN environments, as current philosophy appears to be shifting towards more spindles being better than few dedicated spindles. I'm at the fourth place now in 2 years that is practically ruled by this concept unless you've got multiple terabyte level systems.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply