System News
Client Side Partition Alignment and Its Impact on Performance
Some Recommendations on How to Address the Problem
July 22, 2010,
Volume 149, Issue 3

Partition misalignment: a potentially serious problem with a ready solution
 

This blog is for users who create and access LUNs from their Sun Unified Storage appliances using either iSCSI or FC and who might not realize the impact on performance that client side partition alignment can exert. Blogger David Lutz characterizes this issue as generic rather than one that involves only Unified Storage appliances but adds, reassuringly, that achieving proper alignment is relatively simple.

Lutz explains how the traditional 512 byte sectors that have been the foundation of storage contrasts with the use of block storage organized in 4KB units or larger. Alignment becomes a critical issue, he writes, when a client block that is not properly aligned spans multiple volume blocks in the LUN, which can result in 2 appliance reads for a single client read, or 2 appliance reads plus 2 appliance writes for a single client write. The impact on performance in this instance is clear.

Lutz's article illustrates graphically how, with properly aligned partitions, skipping a small amount of space in in the LUN results in a significantly large reduction in I/O.

He next identifies three primary issues that can result in partition misalignment:

  • Dealing with the label sectors at the beginning of a disk

  • Constraints in partition management software; this relates to how sectors are grouped into partitions, which are governed by disk characteristics rather than user-selected volume block sizes

  • The capability to create multiple partitions within a disk invites the creation of misaligned partitions even though the first partition may be aligned

The result of all this, Lutz writes is that, "Taken together, these factors mean that block zero of a given partition may map to an arbitrary 512 byte sector on a virtual disk, and for most platforms your partitions will not be aligned on LUN volume block size boundaries by default."

The author has several recommendations for ensuring properly aligned partitions.

  • Simplify the math by using a disk label that allows sector addressing, not cylinder addressing for partition/slice locations

  • Using cylinder addressing is best done when one creates a single data partition/slice on the LUN, Lutz notes. This practice avoids the need to calculate alignment at multiple points within the LUN, he says.

  • Users of Windows 2003 or later, when offered an explicit alignment option by disk partitioning software, should opt for it. Here he writes, "You should specify an alignment that either matches the volume block size in the LUN, or is a power of two and is larger than the volume block size."

Lutz next includes suggestions for both aligning by sector and aligning by cylinder, followed by caveats that apply to both practices.

The blog concludes with platform-specific recommendations for Solaris on SPARC; Solaris on x86/amd64/x86_64; Linux; and Windows.

More Information

Storage Domains

New Version of the Sun Unified Storage Simulator

More OpenStorage articles [...read more...]

Keywords:

fullsource
 

Other articles in the OpenStorage section of Volume 149, Issue 3:
  • Client Side Partition Alignment and Its Impact on Performance (this article)

See all archived articles in the OpenStorage section.



News and Solutions for Users of Solaris, Java and Oracle's Sun hardware products
Just the news you need, none of what you don't – 42,000+ Members – 24,000+ Articles Published since 1998