Storage Alignment or the lack there of…

By , Friday, September 21st 2012

Categories: Analyst Blogs

Tags: EMC, HP, IBM, Microsoft, misalignment, NetApp, Oracle, performance, SSD, storage, storage Efficiency, Storage Performance,

Storage Misalignment has been a performance issue that has been around for a long time. It can contribute to as much as a 30% loss in performance is not resolved.  It has always been a consideration in the physical environments for many years and virtual environment are no immune.  There have been posting in the past by folks like, Duncan Epping, Vaughn Stewart, Chad Sakac, and Joshua Townsend.  But I keep getting questions and finding that folks are still either struggling with misalignment or still have not taken misalignment in consideration when looking at performance best practices.  So let’s take a look misalignment once more…

What is Partition Alignment?

Data can be segmented or grouped together in what we call partitions. Then to these partitions are laid out in such a way as to optimize how data is written or read to rotating media or Solid State technology.  Now that new hard drives rely on a different sector base servers and desktops may not recognize the change and this may produce further performance degradation. To add to the complexity RAID sets also need to be aligned as well. With the increased adoption of SSD and Flash technology this also comes with unique performance considerations for alignment.

When partitions are not properly aligned performance degradations have been measured as high at 30%.  This degradation can cost companies company and degrade the amount of business a company can transact at a time.  So it is very important to make sure partitions are aligned properly.

What causes partitions to be misaligned?  A physical sector size is typically not 512 byte and the given software does not know it.  The latest drives have a physical sector size of 4096 bytes and operates 4k chunks of data but some hardware and software are unaware of this and they may appear as the usual 512 byte sectors that hard drives have been presenting for years.

The figure here shows what a misalignment would look like.  The partition is offset from the first 512 byte sector that can be accessed on the disk.  As a result all of the logical clusters above the offset partitions are now have twice as many read/write operations increasing the amount of work that needs to be done to access data and thus degrades performance.  So now the hard drive has to manage two operations on two sectors instead of just managing one operation on one sector. For the new 4k drives they much do a read-modify-write operation for every write which creates a noticeable degradation in performance.

What causes this small offset creating the misalignment? All Windows operating systems versions before Vista use a 512 byte sector size to create cluster volumes. Therefore the OS starts aligning to 512b sectors and not to 4K sectors.

Due to a historical artifact of measuring on a ‘disk cylinder’ with earlier versions of DOS and Windows there were requirements for the partition to be aligned to the ‘disk cylinder’ so that addressing and accessing sectors would happen correctly.  Since then OS’s use a logical block addressing scheme so there are no more ‘disk cylinders’ or ‘disk heads’ and so sectors are continuously addressed over the whole disk drive.  Starting with Vista ‘cylinder alignment’ is no longer used.

By aligning all partitions this will give the system as much as 30% increase in performance. (Mileage may vary depending on the configuration)

SSD Storage Demands Proper Partition Alignment

Solid state drives (SSDs) are becoming more popular for most computing technologies. When migrating data from rotating media to SSD and flash technology make sure correct alignment is implemented to maximum optimized performance for the long term. Most SSD and flash are designed with 4k.

The life span of an SSD is limited today with the degradation of the SSD memory cells and has a limited amount of read/write cycles (around 10 million) before they become unusable.  Misaligned partitions can shorten the life of the SSD with too many unnecessary read-modify-writes.  Not only do you maximize the performance but you also prolong the life of the SSD device.

Important note:  I am hearing that new SSDs coming out later in 2012 this 10 million writes limit for the life of the SSD goes away.  The 10x price on SSDs is estimated to be more affordable about 3x in price.  This is good news for the longevity and price/performance of the new SSDs.

Tools available for Realignment

A partition alignment tool moves partitions on the 512b sectors so that all volumes become aligned. So by moving the partition start on 2048 512b sectors from the disk start to equal 1MB will perfectly fit the 4K sectors boundaries rule.

A couple of examples of free tools available for download are:

Partner Best Practices

Storage vendors are great about publishing best practices for misalignment of their technologies.  Here are some to name a few:

Oracle:

Partition Alignment Guidelines for Unified Storage

EMC:
http://www.emc.com/collateral/hardware/technical-documentation/h2370-microsoft-sql-svr-2005-ns-series-iscsi-bp-plan-gde-ldv.pdf
http://www.emc.com/collateral/hardware/solution-overview/h2529-vmware-esx-svr-w-symmetrix-wp-ldv.pdf

HP:
http://h71019.www7.hp.com/ActiveAnswers/downloads/Exchange2003EVA5000PerformanceWhitePaper.doc

IBM:
http://www.redbooks.ibm.com/redbooks/pdfs/sg247521.pdf
http://www.redbooks.ibm.com/redbooks/pdfs/sg247146.pdf

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

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

NetApp:
http://media.netapp.com/documents/tr-3747.pdf

Final Thoughts

Alignment in a virtual infrastructure is critical to performance, hardware lifecycle, and storage efficiencies. Misalignment can cause performance degradations as high as 30%, shorten the life span of SSDs and makes storage work unnecessarily harder.  In the future, partition alignment issues for 4K HDD and SSD will lessen as 4K physical sectors and memory pages become visible and accessible on the operating system level, and the need for emulating becomes unnecessary.  In the meantime misalignment will continue to be a performance problem and proper alignment will continue to be an essential part of performance best practices.

 

Forgot your password? Reset it here.