SSD Alignment

Problem description

The traditional rotating disks are divided into physical sectors. The Windows operating systems and their components operate according to this sector logic. Despite the fact that SSDs store the data in a completely different way, they are still being treated with this sector logic.

The alignment of the SSD is required to assure that a logical sector starts exactly at the beginning of a physical page of the SSD. Without the alignment, the sector boundaries and the page boundaries will not match and sectors will span pages. That would require for a Windows write operation to clear two blocks in lieu of only one thus reducing the write speed by 50%.

Situation

If you install Windows7 on a brand new SSD, you need not make any special arrangements because the Windows7 installer will do the alignment for you. For Vista you are lucky because the start sector happens to match a SSD page. For XP the start sector is 126 which would be in the middle of a SSD page, thus a prior alignment is required.
A similar situation is present when you clone an existing OS (including Windows7) on a new SSD.

Solution

The easiest way to align an SSD is to create an aligned partition on the SSD with the help of Diskpart. Open an elevated command prompt and run the following sequence of commands – each line followed by Enter.

Diskpart
List disk
Select disk n (where n is the number that was given for your SSD in List disk)
Clean
Create partition primary align=1024
Format fs=ntfs quick
Active (assuming you want to install an OS)
Exit

Note: If you want to create a 100MB partition with alignment, the create command is:

Create partition primary size=100 align=1024

The size unit is always MB.

Verification

If you want to verify the alignment (e.g. for a SSD where you are not certain whether the proper alignment was done), you use the following commands.

Diskpart
List disk
Select disk n (where n is the number that was given for your SSD in List disk)
List partition

Now you should see a result like this.

Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Primary 59 GB 1024 KB - but 64KB or any number divisible by 4 is also good

The offset (in KBs) has to be divisible by 4.


Note: Some readers and users of this tutorial got confused because the alignment numbers in a typical Windows7 installation are shown as:

1024KB for the 100MB partition
101MB for the next partition - which is most likely the C partition

They think that 101MB is not divisible by 4 and that there must be a problem. But that is not so. If you convert 101MBs into KBs (multiply by 1024), then the number is divisible by 4 and the partition is aligned.















 
Last edited by a moderator:
I have 2 questions about aligning a SSD for reinstallation of Windows... sorry if the answer has obviously been answered, I am new to this.

You say that for installing Windows 7 on a 'brand new SSD', aligning is not needed since the Windows 7 installer will take of that. Does 'brand new' include if I have just completed a 'clean all' on a SSD that previously had Windows 7 installed on it? What if I had only done a 'clean' on the SSD?

You also mention that if the 100 MB reserved partition is correctly aligned, the following partition (C) will be correctly aligned as well... what if I create an additional partition on the SSD later after installing the OS on C (say F to install XP on). Will this new partition also be correctly aligned? Basically what I am asking is if the 1st partition on a SSD is correctly aligned, will all subsequent partitions also be aligned or only the 2nd partition (not necessarily the 3rd, 4th...)?

Thanks for any help.
 

My Computer My Computer

At a glance

Windows 7 Professional 64bit
OS
Windows 7 Professional 64bit
1) yes - but I do not recommend a 'Clean All' for the SSD because it writes zeros in the SSD which will later slow down write operations. If any, make a 'Secure Erase': How to securely erase an SSD drive | How To - CNET

2) also Yes - The alignment has to be a number divisible by 4, but at the KB level. As soon as you have an even small partition in the front of the SSD that has some MBs, any address behind it is divisble by 4 at the KB level.

Example: If the first partition is an aligned 100MB partition, the next partition will start at 101MB - which is 101.000 KB. And that is easily divisible by 4.
 

My Computer My Computer

At a glance

Vista, Windows7, Mint Mate, Zorin, Windows 8from 1.6GHz Duo to i7
Computer Manufacturer/Model Number
HP, Dell, Gateway, Toshiba - 4 laptops and 2 desktops
OS
Vista, Windows7, Mint Mate, Zorin, Windows 8
CPU
from 1.6GHz Duo to i7
Monitor(s) Displays
2x HP w2207
Hard Drives
5x HDD, 7x SSD, 12x Externals
Keyboard
with trackball - no mices
Mouse
Trackball mice
Internet Speed
DSL 6000
hm well I already did a 'Clean All' on the SSD and am in the process of installing Windows 7 on it right now. Will the zeros slow down performance enough that you would suggest I 'Secure Erase' the drive and redo things?

Thanks again.
 

My Computer My Computer

At a glance

Windows 7 Professional 64bit
OS
Windows 7 Professional 64bit
hm well I already did a 'Clean All' on the SSD and am in the process of installing Windows 7 on it right now. Will the zeros slow down performance enough that you would suggest I 'Secure Erase' the drive and redo things?

Thanks again.
The purist would say YES - but I am pragmatic and would not start from scratch. Eventually the garbage collection will clean it. You will have some slowdown of the write operations for a little while. But I doubt that you will even notice much of a difference.

Next time do a 'Clean' without the 'All' parameter. Then only the control records get cleared. And when you are about to reinstall or reimage the whole bit, you can still do a Secure Erase. In case of a reimage, you then first have to realign the SSD after the Secure Erase. In case of a reinstall, the alignment would be automatically done.
 

My Computer My Computer

At a glance

Vista, Windows7, Mint Mate, Zorin, Windows 8from 1.6GHz Duo to i7
Computer Manufacturer/Model Number
HP, Dell, Gateway, Toshiba - 4 laptops and 2 desktops
OS
Vista, Windows7, Mint Mate, Zorin, Windows 8
CPU
from 1.6GHz Duo to i7
Monitor(s) Displays
2x HP w2207
Hard Drives
5x HDD, 7x SSD, 12x Externals
Keyboard
with trackball - no mices
Mouse
Trackball mice
Internet Speed
DSL 6000
I ended up doing a Secure Erase anyways because I had some problem with drivers during my reinstall. I am following the procedure you linked to use Parted Magic to Secure Erase... however I am presented with the option to either Secure Erase my Kingston SSD or Enhanced Secure Erase the drive. Do you have a suggestion for which to go with?
 

My Computer My Computer

At a glance

Windows 7 Professional 64bit
OS
Windows 7 Professional 64bit
Let me refer you to their Q&A:


Normal secure erase (current SE implementation), and Enhanced secure erase (see below). Block and Normal secure erase are intended for elimination of user data up to the Confidential level, and Enhanced secure erase for higher levels. The Enhanced level has recently been implemented in drives by Seagate, Fujitsu and Hitachi. These four erasure protocols exist because users make a tradeoff between the erasure security level and the erasure time required.

You only need "Normal".
 

My Computer My Computer

At a glance

Vista, Windows7, Mint Mate, Zorin, Windows 8from 1.6GHz Duo to i7
Computer Manufacturer/Model Number
HP, Dell, Gateway, Toshiba - 4 laptops and 2 desktops
OS
Vista, Windows7, Mint Mate, Zorin, Windows 8
CPU
from 1.6GHz Duo to i7
Monitor(s) Displays
2x HP w2207
Hard Drives
5x HDD, 7x SSD, 12x Externals
Keyboard
with trackball - no mices
Mouse
Trackball mice
Internet Speed
DSL 6000
Hi WHS
First visit to the Win 7 forums looking for answers to my sdd install problems. I made the original mistake of wiping a seemingly sound install of Win 7 to start again & since then Win 7, its drivers or updates have never seemed to install without file corruption problems. Needless to say I didn't do it "clean" as you guys here would advocate.
I have since read the tutorial by Bare Foot Kid & studied the discussion thread that followed (all 26 pages!) & thought I had a sound game plan until I read your advice " clean using Parted Magic rather than the Clean All command. Both seem to write zeros to the whole disk so why is the former now the preferred option? I notice PM warns about "bricking" the disk. That sure doesn't sound good but I guess both options could do that. I would be pleased if you could explain.
Thanks.
Keith
My SSD is a Crucial M4 256 btw.
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
OS
Windows 7 Home Premium 64 bit
Let me refer you to their Q&A:


Normal secure erase (current SE implementation), and Enhanced secure erase (see below). Block and Normal secure erase are intended for elimination of user data up to the Confidential level, and Enhanced secure erase for higher levels. The Enhanced level has recently been implemented in drives by Seagate, Fujitsu and Hitachi. These four erasure protocols exist because users make a tradeoff between the erasure security level and the erasure time required.

You only need "Normal".

Sorry, I guess I could have looked that up on my own... I just read the Parted Magic help regarding Enhanced secure erase which was a bit confusing and didn't think to look up the Q&A.

Along the lines of what Greyjoy asked though, I too am a little confused about the difference between a 'Clean all' and 'Secure erase' since Parted Magic says that the Secure erase option will write zeroes to the entire disk.

Either way, thanks for all of your help.
 

My Computer My Computer

At a glance

Windows 7 Professional 64bit
OS
Windows 7 Professional 64bit

My Computer My Computer

At a glance

Vista, Windows7, Mint Mate, Zorin, Windows 8from 1.6GHz Duo to i7
Computer Manufacturer/Model Number
HP, Dell, Gateway, Toshiba - 4 laptops and 2 desktops
OS
Vista, Windows7, Mint Mate, Zorin, Windows 8
CPU
from 1.6GHz Duo to i7
Monitor(s) Displays
2x HP w2207
Hard Drives
5x HDD, 7x SSD, 12x Externals
Keyboard
with trackball - no mices
Mouse
Trackball mice
Internet Speed
DSL 6000
Thanks for the reply WHS
Got to admit that article was mostly over my head to be honest. I did pick up it referred to Sandforce controllers which I believe my M4 is not based. So assuming at this stage the benefits apply generically I will go with your recommendation, download PM & use secure erase.

Keith
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
OS
Windows 7 Home Premium 64 bit
I restored Windows 7 wich was backed up on a non SSD with Acronis True Image, and my installation is aligned exactly like the 'typical windows 7 installation'

Is that just luck, or does Acronis somehow do this?
 

My Computer My Computer

At a glance

windows 7 64 bit
OS
windows 7 64 bit
I am not a user of Acronis, but I know that Macrium keeps the alignment. So I would guess that Acronis does the same thing.
 

My Computer My Computer

At a glance

Vista, Windows7, Mint Mate, Zorin, Windows 8from 1.6GHz Duo to i7
Computer Manufacturer/Model Number
HP, Dell, Gateway, Toshiba - 4 laptops and 2 desktops
OS
Vista, Windows7, Mint Mate, Zorin, Windows 8
CPU
from 1.6GHz Duo to i7
Monitor(s) Displays
2x HP w2207
Hard Drives
5x HDD, 7x SSD, 12x Externals
Keyboard
with trackball - no mices
Mouse
Trackball mice
Internet Speed
DSL 6000
Simple way to align multiple SSD partitions

I've noticed a lack of information on the internet in regard to aligning the partitions of an SSD. I have discovered a really simple way to handle the task, and it seems fool proof. All one needs is to use the disk management utility in Windows 7.

First, add the new SSD to a Win 7 machine (leave the boot drive in). Boot the system, then go to the computer management console (right-click on My Computer and select Manage from the menu) and click on Disk Management. The new SSD should appear in the disk map. Right-clicking on the SSD entry will bring up a context sensitive menu that will allow one to initialize the SSD (create MBR), format it, and shrink or the extend volumes.

Initializing and formatting the SSD will automatically align the first volume with a partition offset at 1,048,576 bytes (1,048,576 divided by 4096 = 256). To separate the disk into multiple volumes, right-click on the SSD entry and select Shrink Volume. Enter the amount the volume is to be shrunk by (this will be the size of the new 2nd volume). Finish the process. Next, right-click on the new volume and select Format. Then go to the Start Menu and type msinfo32 into the search box. Go to Components->Storage->Disks. Find the SSD and locate the partition information. The Partition Starting Offsets for both the first and second partitions will be divisible by 4096 with no remainder.

Repeat the above process to divide up the disk into the desired number of partitions. All should be correctly aligned.
 

My Computer My Computer

At a glance

Win 7 32 bit
OS
Win 7 32 bit

My Computer My Computer

At a glance

Windows 10 ProIntel Core i7-4770K (3.5Ghz)32 gig Corsair Dominator Platinum (4x8Gig)Sapphire Tri-X R9 Fury
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom built by me.
OS
Windows 10 Pro
CPU
Intel Core i7-4770K (3.5Ghz)
Motherboard
Gigabyte G1 Sniper 5 (F10 Bios)
Memory
32 gig Corsair Dominator Platinum (4x8Gig)
Graphics Card(s)
Sapphire Tri-X R9 Fury
Sound Card
Soundblaster ZXR
Monitor(s) Displays
NEC PA242W 24" LCD Monitor
Screen Resolution
1920 x 1200
Hard Drives
Primary - Samsung 850 Pro (512gig), Samsung 840 Pro (256gig), 2TB WD Caviar Black.
PSU
EVGA Supernova 1000 G2
Case
Cooler Master HAF X
Cooling
Corsair H100i with Corsair Air Series SP120 Quiet Fans
Keyboard
Logitech Wireless Wave
Mouse
Logitech Performance MX
Internet Speed
High Speed Cable
Antivirus
Norton Security
Browser
IE11
Other Info
Memory Timings - 1866MHz @ 9-9-9-27-1T @ 1.5 volts
Hi There, Quick Question...

So if you do nothing with a freshly wiped (with no allocated partitions at all) IDE DRIVE, install WIN7 64bit onto it and get all the updates and programs up and running .... then clone that drive to an SSD with Acronis. Will that automatically set up the SSD alignment correctly?

Took only 7 minutes to clone it.

=====================================================================================
I am saying this is past tense as I have already done an upgrade and kicked it out the door with rocket fast speed differences. It literally now takes 15-19 seconds to boot into the Os with the New SSD 60 gig drive I set up as the primary ....

I upgraded it to the motherboards max. It is an older PC and now has with 8gig of DDR2 1066 Cosair ram with a new graphics card and Power supply, also upgraded the CPU to a Quad core 2.33G intel.

I was abolutely amazed at the change in the machine :) for under $450 in parts you get the new age feel for a fraction of the cost. Of couse I uploaded and flashed the latest Bios and Chipset drivers.

I benchmarked the read write speeds before and after and it was 34.2 wit hthe IDE and now is 186.4 !!!
Cheers

Westy
 

My Computer My Computer

At a glance

WINDOWS 7INTEL Q6600 2.4GHz Quad COre4GB Corsair DominatorGeforce 8500 GT
Computer Manufacturer/Model Number
POWERBOX
OS
WINDOWS 7
CPU
INTEL Q6600 2.4GHz Quad COre
Motherboard
GIGABYTE X38-DS4
Memory
4GB Corsair Dominator
Graphics Card(s)
Geforce 8500 GT
So if you do nothing with a freshly wiped (with no allocated partitions at all) IDE DRIVE, install Windows 7 64bit onto it and get all the updates and programs up and running .... then clone that drive to an SSD with Acronis. Will that automatically set up the SSD alignment correctly?
It is possible - I am not sure what Acronis does. But to be on the safe side, I would prefer to restore the image into a predefined, aligned, primary, active partition.
 

My Computer My Computer

At a glance

Vista, Windows7, Mint Mate, Zorin, Windows 8from 1.6GHz Duo to i7
Computer Manufacturer/Model Number
HP, Dell, Gateway, Toshiba - 4 laptops and 2 desktops
OS
Vista, Windows7, Mint Mate, Zorin, Windows 8
CPU
from 1.6GHz Duo to i7
Monitor(s) Displays
2x HP w2207
Hard Drives
5x HDD, 7x SSD, 12x Externals
Keyboard
with trackball - no mices
Mouse
Trackball mice
Internet Speed
DSL 6000
It is possible - I am not sure what Acronis does. But to be on the safe side, I would prefer to restore the image into a predefined, aligned, primary, active partition.

Cheers... so back up image it with Acronis (which is what I use for all my backup and restoring and cloning) and then get the drive all back to stock factory and go through the alignment process? I wonder if that will increase the drives speed from 184 to higher? or whether It fluked it because it was already an image off an existing cloned SATA Drive?...... I wish I could get my unit to run in AHCI mode ... but alas even with the latest Bios on the EP45-DS3 board ... it BSOD's on me. should I try ti by loading the drivers (Intel when the operating system asks?
Cheers
Westy
 
Last edited by a moderator:

My Computer My Computer

At a glance

WINDOWS 7INTEL Q6600 2.4GHz Quad COre4GB Corsair DominatorGeforce 8500 GT
Computer Manufacturer/Model Number
POWERBOX
OS
WINDOWS 7
CPU
INTEL Q6600 2.4GHz Quad COre
Motherboard
GIGABYTE X38-DS4
Memory
4GB Corsair Dominator
Graphics Card(s)
Geforce 8500 GT
Westy, AHCI is nice to have but IDE mode is not that much slower. I would not stand on my head for AHCI. I run several old systems in IDE with good results.

Regarding alignment, just check it. Instructions are under 'Verification' of this tutorial.
 

My Computer My Computer

At a glance

Vista, Windows7, Mint Mate, Zorin, Windows 8from 1.6GHz Duo to i7
Computer Manufacturer/Model Number
HP, Dell, Gateway, Toshiba - 4 laptops and 2 desktops
OS
Vista, Windows7, Mint Mate, Zorin, Windows 8
CPU
from 1.6GHz Duo to i7
Monitor(s) Displays
2x HP w2207
Hard Drives
5x HDD, 7x SSD, 12x Externals
Keyboard
with trackball - no mices
Mouse
Trackball mice
Internet Speed
DSL 6000
Westy, AHCI is nice to have but IDE mode is not that much slower. I would not stand on my head for AHCI. I run several old systems in IDE with good results.

Regarding alignment, just check it. Instructions are under 'Verification' of this tutorial.

I would suggest KiwiXboxer read his dicumentation as some SSD drives (my OCZ does) will tell you to use AHCI. And I personally think all SSD drives should be using AHCI.

As to the performance gains, well, that can be debated by those more adept in the area than I am.

Anyway read your documentation and see what it recommends.

With regards to Acronis, I'll put it this way, anything after 2010 should be aligning SSD drives. I know my copy of Acronis 2010 does, or at least it doesn't remove them if it's there.

Edit: Regarding AHCI and SSD drives (OCZ) - http://blog.ocztechnology.com/?p=178. Again, does it "have" to be enabled, debatable. However there's really no reason not to in today's systems.

My two cents.
 

My Computer My Computer

At a glance

Windows 10 ProIntel Core i7-4770K (3.5Ghz)32 gig Corsair Dominator Platinum (4x8Gig)Sapphire Tri-X R9 Fury
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom built by me.
OS
Windows 10 Pro
CPU
Intel Core i7-4770K (3.5Ghz)
Motherboard
Gigabyte G1 Sniper 5 (F10 Bios)
Memory
32 gig Corsair Dominator Platinum (4x8Gig)
Graphics Card(s)
Sapphire Tri-X R9 Fury
Sound Card
Soundblaster ZXR
Monitor(s) Displays
NEC PA242W 24" LCD Monitor
Screen Resolution
1920 x 1200
Hard Drives
Primary - Samsung 850 Pro (512gig), Samsung 840 Pro (256gig), 2TB WD Caviar Black.
PSU
EVGA Supernova 1000 G2
Case
Cooler Master HAF X
Cooling
Corsair H100i with Corsair Air Series SP120 Quiet Fans
Keyboard
Logitech Wireless Wave
Mouse
Logitech Performance MX
Internet Speed
High Speed Cable
Antivirus
Norton Security
Browser
IE11
Other Info
Memory Timings - 1866MHz @ 9-9-9-27-1T @ 1.5 volts

My Computer My Computer

At a glance

Windows 7x64 Home Premium SP1Intel i7 2600kG.Skill Ripjaws (DDR3-1600) 2x4GBNvidia GeForce GTS 450; Intel HD Graphics 300...
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Own build
OS
Windows 7x64 Home Premium SP1
CPU
Intel i7 2600k
Motherboard
ASUS P8Z68 Deluxe
Memory
G.Skill Ripjaws (DDR3-1600) 2x4GB
Graphics Card(s)
Nvidia GeForce GTS 450; Intel HD Graphics 3000(GT2+)
Monitor(s) Displays
Dell Ultrasharp IPS panel U2311H, Samsung SyncMaster P2350
Screen Resolution
1920x1080
Hard Drives
Samsung 850 Pro SSD 256GB, Samsung SSD 840 120GB, Seagates 1TB Barracuda ST31000528AS x2
PSU
Seasonic M12II 520W
Case
Lian Li Lancool PC-K60
Cooling
Case: 1x120mm, 3x140mm CPU: Hyper 212+
Keyboard
Logitech MK520 (wireless)
Mouse
Logitech MK520
Internet Speed
6-7 Mbps
Antivirus
Norton Security Premium, Malwarebytes on 2 (MSE on 3rd PC)
Browser
FireFox
Other Info
Audio: Logitech Z523 2.1
Back
Top