![]() |
|
|
#1 |
![]() Join Date: Sep 2009
Posts: 40 (0.03/day)
Thanks: 2
Thanked 20 Times in 8 Posts
|
Partition Alignment Spreadsheet
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.
Using this spreadsheet's calculations, TechPowerUp!'s W1zzard wrote a great Javascript applet that calculates SSD alignment without the need to download the spreadsheet! The Javascript applet is linked below. 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. 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. Windows Vista/7 will both correctly align a partition. You must not have any previous partitions on the SSD and allow Windows to create and quick format the partition during the installation procedure. 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. Online SSD Alignment Calculator written by TechPowerUp!'s W1zzard. VBScript Alignment Checking Tool originally written by TcpDump's Tom Hirt. Discovered by Halk and edited by me to work with all SSDs with 512kb block sizes. SSD Alignment Spreadsheet created by me. Jason Last edited by techspec6; Jan 21, 2010 at 04:35 AM. |
|
|
|
| The Following 8 Users Say Thank You to techspec6 For This Useful Post: |
|
|
#2 |
![]() Join Date: Sep 2009
Posts: 40 (0.03/day)
Thanks: 2
Thanked 20 Times in 8 Posts
|
![]() SSD Drive Specifications: All OCZ Drives to date NAND Page = 4096 bytes (4k) NAND Erase Block Size = 524288 bytes (512k) Intel X25-M NAND Page = 4096 bytes (4k) NAND Erase Block Size = 524288 bytes (512k) G.Skill Falcon NAND Page = 4096 bytes (4k) NAND Erase Block Size = 524288 bytes (512k) Supertalent Ultra Drive GX NAND Page = 4096 bytes (4k) NAND Erase Block Size = 524288 bytes (512k) Patriot Torqx 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/fo...ad.php?t=48309 by therookie http://www.ocztechnologyforum.com/fo...ad.php?t=55238 by Chrisped http://blogs.msdn.com/jimmymay/archi...-template.aspx http://www.ocztechnologyforum.com/fo...ad.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. Tony was not referring to Sectors/Track. 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 by techspec6; Nov 1, 2009 at 01:29 AM. |
|
|
|
| The Following 5 Users Say Thank You to techspec6 For This Useful Post: |
|
|
#3 |
![]() Join Date: Oct 2005
Location: Dublin, Ireland
Posts: 283 (0.10/day)
Thanks: 58
Thanked 56 Times in 32 Posts
|
Got this from you at the OCZ forums. Very simple and effective! Good job!
|
|
|
|
|
|
#4 |
|
Eligible for custom title
|
Getting hold of some of the data isnt easy. My Supertalent doesnt advertise some of the statistics needed in their spec sheets.
It also seems that my partitions are "not aligned". So what? Can I suggest you update your OP and/or spreadsheet: 1./ Say why it is important to have it aligned, ie. i) faster, and ii) on average you will use 10-100% less write cycles (depending on caching) which therefore reduces wearing/trashing of the drive. The factor could be small... but could be as much as 100%, so worth doing. 2./ Provide DEFAULT values, or recommended values, based on your experience from the other website of hundreds of SSD users. How to do this? I guess that the max/worse case SSD would be the one to use. If that is aligned, then any "better" SSD (ie smaller sized block size, so long as a binary divisor) would also be aligned. 3./ OK, so my SSD isnt aligned. WHAT THE HECK AM I SUPPOSED TO DO ABOUT IT? AND HOW? Maybe you have this information on the another website. But it isnt here, and there is no link, so it is useless. (You updated your posts. Thanks! )***** PS. If you have a partition at the START of a drive, then am I right assuming it MUST be aligned? So it my problem that there is a hidden system-recovery partition at the start. If I nuke that, will I be aligned? Last edited by lemonadesoda; Oct 30, 2009 at 05:34 PM. |
|
|
|
|
|
#5 |
![]() Join Date: Sep 2009
Posts: 40 (0.03/day)
Thanks: 2
Thanked 20 Times in 8 Posts
|
Hold tight, that's actually why I reserved the first 2 post of this thread. I was wanting to gauge interest before overloading you guys with enough information to make your ears bleed. I have a lot of time in November coming up, so expect this thread to expand between now and then.
And you're right. Some SSD manufacturers are not as forthcoming about their specs. I'll see what I can do about getting them anyways. ;-) Jason |
|
|
|
| The Following 2 Users Say Thank You to techspec6 For This Useful Post: |
|
|
#6 |
![]() Join Date: Sep 2009
Posts: 40 (0.03/day)
Thanks: 2
Thanked 20 Times in 8 Posts
|
So far, to my knowledge, if you use the Vista/W7 default offset of 1024kb, you have a very high chance of being aligned no matter what brand SSD you use. The reason is because I do not believe any manufacturer is using an erase block larger than 1024kb and they all divide into 1024kb, thus far. I made the calculator as a spreadsheet so that information could be updated with future SSD technology without making the whole thing obsolete.
Also, W7 creates that second 100MB partition. As long as sequential partitions are multiples of 1024kb, then you're still aligned in most all cases. Both default W7 partitions meet this criteria. Jason Last edited by techspec6; Oct 30, 2009 at 08:07 AM. |
|
|
|
|
|
#7 | |
![]() Join Date: Sep 2009
Posts: 40 (0.03/day)
Thanks: 2
Thanked 20 Times in 8 Posts
|
Quote:
For example: Say you have Windows 7 with it's default offset of 1024kb on the first partition. The second partition it creates is 100MB, meaning that the offset of the OS partition will be 100MB + 1024kb (1MB) = 101MB, thus the second partitions offset will be an even 101MB. If you create another sequential partition, you must be sure that the OS partition is an exact MB value also. If you end a partition with a capacity that's not a whole MB amount, you run the risk of splitting a block or a page. Resulting in a misaligned partition. Microsoft's 100MB partition could have been 99MB, 101MB or 102MB, as long as it's a whole MB. Keep in mind that 1048576 bytes = 1024KB = 1MB Jason |
|
|
|
|
|
|
#8 |
|
Benevolent Dictator
Join Date: May 2004
Location: Stuttgart, Germany
Posts: 13,770 (4.18/day)
Thanks: 184
Thanked 10,216 Times in 3,160 Posts
|
i put this into an easy to use browser-based javascript:
http://www.techpowerup.com/articles/other/157 techspec6 and i will work to refine this further |
|
|
|
| The Following 8 Users Say Thank You to W1zzard For This Useful Post: |
|
|
#9 |
|
Eligible for custom title
|
Jason, thanks for editing first 2 posts. Much clearer now.
W1z, nice javascript. ![]() Question remains open. I've got W2K3 installed. Incl. all applications. I'm not going to reformat and reinstall. So HOW do I fix it? Can acronis disk director, or other partition management software, be used to fix a misaligned drive. What tool do you recommend? How do we overcome the silly "drive size is shown in GB, but is 1GB exactly aligned or is there a counting problem with 2^n and power10 notation? |
|
|
|
|
|
#10 |
![]() Join Date: Sep 2009
Posts: 40 (0.03/day)
Thanks: 2
Thanked 20 Times in 8 Posts
|
Your answer is gparted. There is a risk of data loss, as with anything that edits drives that contain data. Be sure you backup your important files prior to tinkering. When it asks, you want 2048 sectors as the offset. That's equivalent to 1024kb offset which is the windows vista/w7 default.
GPARTED to fix alignment Jason Last edited by techspec6; Oct 30, 2009 at 07:03 PM. |
|
|
|
| The Following User Says Thank You to techspec6 For This Useful Post: |
|
|
#11 |
|
Eligible for custom title
|
Jason,
I have a suggestion. How about updating the spreadsheet to have a section "Proposed remedy" What it would do is calculate how many bytes you have to move the partition forwards or backwards to achieve alignment. That way, we can just use the resulting data in a partition manager to fix it. |
|
|
|
|
|
#12 |
|
Eligible for custom title
|
On the road to discovery:
1./ START, Run... wmic (better than cmd) (type /? for help ) 2./ type partition the additional data will help you figure out what is going on... i discovered my O_S partition was#2! And that my other partitions were hidden within an "extended partition" Last edited by lemonadesoda; Nov 1, 2009 at 01:34 AM. Reason: too many typos |
|
|
|
|
|
#13 |
![]() Join Date: Sep 2009
Posts: 40 (0.03/day)
Thanks: 2
Thanked 20 Times in 8 Posts
|
I like this GUI utility a little better.
Start > run > type msinfo32. When the info program runs, navigate to Components > Storage > DISKS Jason |
|
|
|
|
|
#14 |
|
Eligible for custom title
|
After spending some time playing with Acrons Disk Director, and with EASEUS Partition Master, I find neither tool is sufficiently "granular" to be able to solve the misalignment issue. In fact, I wonder if the design/structure of NTFS is such that IF the first partition (#0) is misaligned then, de facto, all other partitions will be misaligned if those partitions have been created by the standard MS disk management tools (and programs like Acronis or EASEUS included).
Since this is such a SERIOUS issue for SSDs, then perhaps Acronis and the like should include alignment tools in their software. |
|
|
|
|
|
#15 |
![]() Join Date: Sep 2009
Posts: 40 (0.03/day)
Thanks: 2
Thanked 20 Times in 8 Posts
|
Some cloning software will restore an image to a partition without changing the partition's alignment. That means that if you image your system to another drive, delete your misaligned partition, create an aligned partition, quick format it and restore the image back to the newly aligned partition, your result is an aligned partition with your software and OS as they were originally. It's much preferable to create an aligned partition and restore to it rather than fix a misaligned partition.
Jason |
|
|
|
| The Following User Says Thank You to techspec6 For This Useful Post: |
|
|
#16 |
![]() Join Date: Sep 2009
Posts: 40 (0.03/day)
Thanks: 2
Thanked 20 Times in 8 Posts
|
Speaking of good drive cloning software, Windows 7 drive backup works really well and preserves the original alignment of the drive's partition. Images created with it can be restored by booting from the Win7 installation DVD.
Jason |
|
|
|
|
|
#17 | |
![]() Join Date: Dec 2008
Location: UK
Posts: 11 (0.01/day)
Thanks: 8
Thanked 0 Times in 0 Posts
|
Quote:
I'll shortly need to do this re-alignment on a couple of old Laptops when their new SSDs arrive
|
|
|
|
|
|
|
#18 |
|
Join Date: Apr 2011
Posts: 1 (0.00/day)
Thanks: 0
Thanked 0 Times in 0 Posts
|
Turns out my new SSD (OCZ Vertex 3) is misaligned.
I am lost in this thread- would the 2 filess within the zip folder (post #1) help me to re-align the drive? Thx |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help, I deleted a partition, and can't seem to "extend" the other partition | vbx | Storage | 15 | Aug 28, 2009 08:59 AM |
| Website alignment help | El_Mayo | Programming & Webmastering | 2 | May 31, 2009 10:24 PM |
| partition to partition copy | freaksavior | Storage | 28 | Feb 1, 2009 03:37 PM |
| System Flowrate Estimator Spreadsheet V1.7 | d44ve | Overclocking & Cooling | 5 | Nov 7, 2007 01:24 AM |
| Google launches spreadsheet | D_o_S | News | 7 | Jun 7, 2006 06:09 PM |