SQL Server GPT Disk Partition Alignment Best Practices

SQL Server GPT Disk Partition Alignment Best Practices

'The performance question here is not did we pick the correct allocation (unit size of the NTFS default of 4,096 bytes or has it been explicitly defined at 64 KB, which is a best practice for SQL Server), but do we have our disk partition alignment correct with every number ending in a whole complete integer .'
Partition_StartingOffset ÷ Allocation_Unit_Size  -- should be a whole complete integer

Example:

Let's look at Computer Management > Storage > Disk Management
Here we will look at GPT Disk 3 which is 4.5TB presented from a SAN and labeled as the "V" drive

Now we will open command prompt as an Administrator and run the following
" fsutil fsinfo ntfsinfo v:  "  were we update the drive letter as needed
Here we look at the Allocation Unit or  "Bytes per Cluster" and see we have 64KB or (65536 bytes)

Finally we will use the following as it provides more detailed results than diskpart and list disk.  We will use " WMIC Partition get BlockSize, StartingOffset, Name, Index "  where we can capture the Starting Offset.

This is enough information that we can now plug values into are formula and see that in this example we are correctly aligned.

135266304 ÷ 65536 =   2064 -- and this is a whole complete integer

The final answers to everything you have ever wondered about your underlying disk subsystem still may not be answered if your data is presented as a LUN from a SAN then you still need to ask so many more questions about what tier your data is in and are they configured to best SQL Server practices.  This will at least get you to a starting point to perform disk IO tests.

Comments

Popular posts from this blog

How to mass update all or some sql server agent job step commands

SQL Monitoring for Blocking and Locking Capture and Log to table with sp_WhoIsActive or sp_BlitzWho

SQL Server General Index Naming Convention