Disk Partition Alignment

  • Never read about this until today. I am now looking back at various old Windows 2000 and Windows 2003 servers to see if our network guys aligned the partitions properly.

    One thing I don't understand is when you have 3 partitions say on 1 physical disk, are we just worried about the initial Starting Position Offset? I.e. Setting 64k for the C:\ - the D: and E: would be in the 10000000k realm. But that is fine as the numbers work in within the 64k cluster size and 64k stripe unit size. Correct?

    Thanks to anyone who can add input

    :hehe:

  • EDIT: Thought I'd worked it out but haven't.

    Let's use one of my existing servers as an example...

    Partition 1 Starting Offset is 65536. Partition 2 Starting Offset is 11476746240 (11gb ish).

    Stripe and Cluster Unit sizes are 65536.

    Partition 2 test calculations show it as 175121.25. This isn't an INT, and therefore is misaligned? Correct or no?

  • Just to add to your intake of knowledge for the day shark, you may find these resources useful, if you don't have them already:

    http://support.microsoft.com/kb/929491

    http://blogs.msdn.com/jimmymay/archive/2008/12/04/disk-partition-alignment-sector-alignment-for-sql-server-part-4-essentials-cheat-sheet.aspx

    Gethyn Elliswww.gethynellis.com

  • http://support.microsoft.com/kb/929491

    This one is new to me. Helps a lot.

    I am now seeing one of our old servers that performs hideously (not helped by just 1 physical partition for EVERYTHING and on RAID5) but to add to the woes it is misaligned.

    Starting offset of 16384. Block size 512. The cluster size is just 4k, with the stripe unit size at 64k....

    ((Partition offset) * (Disk sector size)) / (Cluster unit size)

    32 * 512 / 4096 = 4

    This calc comes out nice. So all ok there, but if the cluster size had been 64k it would not be aligned which brings me onto...

    ((Partition offset) * (Disk sector size)) / (Stripe unit size)

    32 * 512 / 65536 = 0.25.

    So does this class as a misaligned partition? Cluster units align well, but the stripe unit doesn't - Therefore poor IO due to poor raid striping performance? The server is pretty woeful in the performance stakes although most of this is down to Data and Logs and also OLTP and OLAP sharing the same physical drive (I wasn't here when it was spec'd I promise!)

  • Can anyone help me understand how the 63 hidden sectors and the alignment calculations above come together? I have read the MS White papers but can't get my head around the "63 hidden sector" cause of the misalignment because the solution doesn't mention the hidden sectors, it just mentions and alludes to the cluster size and stripe unit size needing to match up to ensure balanced application to the disks.

    HELP! My brain is fried today.

    EDIT: Am I getting confused and a lot of examples are referring to 63 hidden sectors, which in effect is set by the disk administrator when creating the partition. The 63 hidden sectors is the space created in the Starting partition offet?!?!?! So this 63 could be any number of sectors, and the idea is to get the Cluster Size and the Stripe Unit Size to slot neatly within the offset as a whole number\int.

  • Shark Energy (3/9/2010)


    Can anyone help me understand how the 63 hidden sectors and the alignment calculations above come together? I have read the MS White papers but can't get my head around the "63 hidden sector" cause of the misalignment because the solution doesn't mention the hidden sectors, it just mentions and alludes to the cluster size and stripe unit size needing to match up to ensure balanced application to the disks.

    HELP! My brain is fried today.

    EDIT: Am I getting confused and a lot of examples are referring to 63 hidden sectors, which in effect is set by the disk administrator when creating the partition. The 63 hidden sectors is the space created in the Starting partition offet?!?!?! So this 63 could be any number of sectors, and the idea is to get the Cluster Size and the Stripe Unit Size to slot neatly within the offset as a whole number\int.

    I know that this is an old post, but you can refer http://www.sqlservercentral.com/Forums/Topic1327977-146-1.aspx

    Perry helped me understanding the concepts.

    Also, I have some links to excellent whitepaper esp. the EMC one is good.

    Thanks to Perry again 😀

    ______________________________________________________________________________________________________________________________________________________________________________________
    HTH !
    Kin
    MCTS : 2005, 2008
    Active SQL Server Community Contributor 🙂

  • you're welcome 😉

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 7 posts - 1 through 6 (of 6 total)

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