Partition Alignment Spreadsheet

techspec6

Weaksauce
Joined
Sep 20, 2009
Messages
69
I created an excel spreadsheet that auto-calculates whether your raid array is properly aligned. It also auto-calculates non-raid partitions. You must meet the requirements of all Rules to be considered Aligned.

You must input your own data. It will not fetch your system information automatically. That's why the example column is there.

Let me know of any corrections or additions I can make to the sheet.

Jason

Downloadable Here
 
Align.jpg


OCZ Drive Specifications:

To date, all OCZ drives have the same NAND Page and Erase block size.
NAND Page = 4096 bytes (4k)
NAND Erase Block Size = 524288 bytes (512k)

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

Consolidated list of threads containing info on parititon alignment:

http://www.ocztechnologyforum.com/forum/showthread.php?t=48309 by therookie
http://www.ocztechnologyforum.com/forum/showthread.php?t=55238 by Chrisped
http://blogs.msdn.com/jimmymay/archi...-template.aspx
http://www.ocztechnologyforum.com/forum/showthread.php?t=50376 by Tony

**Notice- These guides will recommend all sorts of partition offsets. SSDs are divided into pages and blocks. Early guides did not take in the importance of aligning to blocks, but instead only pages. Please use the recommended partition alignment of 1024kb (Vista and W7 default) or you may not be aligned to the blocks which can result in less IO performance.

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

Commands to check alignment:

start > run > type "cmd" to enter command prompt, then type "wmic partition get Name,StartingOffset,Size". This method works in XP, Vista and W7.

or

within windows, type msinfo32. When the info program runs, navigate to Components > Storage > DISKS and look for "partition starting offset" with a value in bytes. This method works in XP, Vista and W7.

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

Some alignment misconception:

I've seen some on the forum state that "sectors/track" is what to check when looking at alignment. That is incorrect.

In Tony's post HERE, he states that the start of the first partition begins on sector 63 in Windows XP which we all know as the default misaligned partition. Sector 63 is the same as 32256 byte offset. Sectors/Track is a totally different disk parameter and has NOTHING to do with disk alignment.

Therefore it's all Tony's fault and we'll just blame him...

The math behind it is: starting offset / bytes per sector = starting sector boundary
In the case of windows xp: 32256 / 512 = 63rd sector (not sectors/track)
In Vista/W7: 1048576 / 512 = 2048

HERE is a good read on how disk technology has evolved and why "63 sectors/track" means nothing.

Jason
 
Last edited:
is wmic a Vista/Win7 file only, as I just tried it on my work XP (no SSD) just to see what it said.
 
wmic should work on XP pro, as that's where I tested it. Let me know if it doesn't work for you. If it doesn't, check the information I just enclosed in Post2 under the commands to check alignment heading. The msinfo32 method has an easy to navigate GUI, more information and is much more user friendly.

Jason
 
I haven't seen a good guide on how to align your partition.

Can it only be done from a clean unpartitioned disc? Or can it be done after the disc is partition & an OS is installed?

I tried reading up on it. I read this article: http://thunk.org/tytso/blog/2009/02...s-to-an-ssds-erase-block-size/comment-page-2/

And it was over my head I guess, b/c I still didn't follow what to do.

And is alignment that important with TRIM now?

My partition offset was 32256.... Win XP (home) and Intel X25-M 80Gb.
 
Partition alignment is the single most important performance tweak you can do for any SSD.

Lets break it down to it's simplist form. The SSD is divided into Blocks of 512k which are divided into pages of 4k in most cases. 128 pages = 1 block.

There is a certain amount of space before the start of the first partition, which is what is referred to as the offset. Vista and W7 use a default offset of 1024k, meaning there's 1024k of empty space before the partition. Starting at 1024k means that the partition starts at the beginning of the third block, since blocks are 512k (512k x 2 = 1024k).

The goal is to not start a partition in the middle of a block or a page. That way, you don't split any boundaries. If you split a page (4k) section, then 2 writes are necessary to write the page instead of 1, doubling the work. It will happen repeatively every 8th page, reducing overall performance and I/O commands. Blocks have a similar performance hit but not to the same degree as pages. It's easy to align to both.

Alignment has to be done when the partition is created. There are tools such as a gparted boot CD that can change alignment after it's created, but it's not 100%. Sometimes, you can lose your data with that method. It's best to fresh install and correctly create the partition at the beginning.

If you're running Vista or W7, the alignment is done automatically by the OS as long as you use the installation DVD to create the partition. WinXP is another story because it will not align a partition correctly by default. Extra steps are involved. The easiest way to align a WinXP OS volume is to get the downloadable Vista Recovery DVD and create the OS partition before the installation of WinXP. The partition created by the Vista Recovery DVD will be the same as the Vista Installation DVD and will be aligned at 1024kb by default which is a valid alignment for todays hardware.

It takes a moment to wrap your head around the new technology, but the sooner you forget HDDs, sectors, tracks, and cylinders, the better off you'll be. It's all about the blocks and pages now.

Jason
 
Hmmm... problem is I'm lazy! So I don't feel like reinstalling OS & apps, after just getting everything perfect.

I guess I will try gparted boot CD.
 
Hmmm... problem is I'm lazy! So I don't feel like reinstalling OS & apps, after just getting everything perfect.

I guess I will try gparted boot CD.

What happens if you use something like True Image to clone SSD to a HDD - then align partition on SDD - then "re-clone" back to SSD?
 
I don't know about true image, but some drive imaging software will restore to an aligned partition without breaking the alignment.

So to answer your question, yes. That's how most fix a misaligned partition. It's much safer than using software such as gparted. Simply image your drive, delete the misaligned partition and recreate the partition correctly aligned, restore to the new partition.

Jason
 
what software would you recommend to image the drive?

Can Clonezilla do it? I have that on a CD, but I've only used it for making a copy of HD to HD.

I'm trying to figure out which app to use. I have Ultimate Boot CD and it has quite a few partition tools on it.

Something free that works well. Any suggestions?!
 
Last edited:
So here's a screenshot of my drive from EASEUS:

alignment.gif


Since there is 0 empty space before the active partition does that mean that its aligned?
 
I'm not familiar enough with EASEUS to say, honestly. I use ghost 12.0 to image my drives, though it's not free. I've heard that the backup solution that comes with win7 works really well.

Jason
 
What happens if you use something like True Image to clone SSD to a HDD - then align partition on SDD - then "re-clone" back to SSD?

Not a problem. you can even backup a raid system then put it back on a single drive if you want or vise versa.:D
 
So here's a screenshot of my drive from EASEUS:

alignment.gif


Since there is 0 empty space before the active partition does that mean that its aligned?

No, it just means there is no empty space at the beginning of the disk, most if not all of partition utilities align to 63 sectors.
 
I am setting up a pair of OCZ Vertex 4's in RAID 0 in the next couple of days, is partition alignment still necessary on SSDs in RAID? If so is this spreadsheet still valid?
 
Win7 should automatically align the partition correctly.

Holy old post bump batman.
 
Win 7 will align the partition automatically on a RAID 0 array?

Yeah I know old post, I still had the spreadsheet saved so I looked up the thread.
 
Back
Top