SSD Alignment

Page 1 of 14 12311 ... LastLast
    SSD Alignment

    SSD Alignment

    Published by
    Designer Media Ltd


    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.


















  1. Posts : 8,870
    Windows 7 Ult, Windows 8.1 Pro,
       #1

    I have a question, mine shows the 100MB mini default partition as the one with the 1024KB offset, and the 111GB partition having 101MB offset, it did this all by default. Is this right or not?

    It seems like the larger 111GB partition should be the one with the 1024 offset? I'm not sure if this matters or not.
    Attached Thumbnails Attached Thumbnails SSD Alignment-ssd-partition-alignment.png  
      My Computer


  2. whs
    Posts : 26,213
    Vista, Windows7, Mint Mate, Zorin, Windows 8
    Thread Starter
       #2

    The only program I know that will align a partition without disturbing the data is from Paragon ( Paragon Alignment Tool - Overview ). But they want $30 and I did not see a trial.
    But it seems to be pretty common that the second partition on a SSD is not properly aligned - which, of course, is not good. But with Diskpart, you can only align the whole volume.
      My Computer


  3. Posts : 15,166
    Vista x64 / 7 X64
       #3

    I dunno about lucky, whs.

    MS deliberately set Vista alignment that way.

    Unless you want to shell out for PAT ( works very well, btw ), you could try this:

    Image your main partition with macrium/paragon.

    Delete the main partition with diskpart from 7 dvd.

    Create new main partition with alignment you want - still using Diskpart.

    Restore the image you made to that new partition.

    See if the alignment is retained - I expect it will be.

    Before you do that- you need to ask:

    If 1024 is divisible by 4, is 101 x 1024 also divisible by 4 ?
      My Computer


  4. whs
    Posts : 26,213
    Vista, Windows7, Mint Mate, Zorin, Windows 8
    Thread Starter
       #4

    1024 multiplied with any number is divisible by 4. But what does that tell me? Are you suggesting that the 101 offset of the second partition is OK?
      My Computer


  5. Posts : 8,870
    Windows 7 Ult, Windows 8.1 Pro,
       #5

    I will say that my write speeds are up there with what everyone else shows. The SSD works flawlessy, not to mention all my WEI scores "winsat SSD test" were in the mid to high 7's.

    I would think that Windows 7 would get this right since it's a default installation on a new SSD.

    1024*101= 103,424/4= 25,856

    It would seem silly if I needed to omit the 100MB boot partition just to get the alignment right.

    Windows should be getting this right by default because it was made to work with SSD's.

    After doing some reading I found out that in fact Windows did get right by starting the alignment with the 100MB boot partition.

    It has to be a multiple of 64. that is 64,128...1024,2048 etc.
    Very crudely put, SSD write in 64 blocks. If your alignment is 63 (as set by Acronis) each write/read will span two blocks etc. Hence the so called 50% inefficiency.

    For example, if you do a freah install of Win 7 on a fresh SSD, Win 7 will create a initial partition of 100MB with the correct alignment. all subsequent partitions (C Drive etc.) will follow this initial partition set in full MB multiples- hence preserving the 64bit multiple alignment/ offset.
    I have attached a copy of my properly aligned/offset SSD drive.
    AttachmentSizeSSDOffset.jpg

    From the Acronis site.> Is everyone exaggerating the steps for SSD alignment when upgrading to an SSD? | Knowledge Base
    Attached Thumbnails Attached Thumbnails SSD Alignment-ssd-partition-alignment.png  
    Last edited by chev65; 27 Nov 2010 at 11:25.
      My Computer


  6. Posts : 968
    Windows 7 Ultimate x64
       #6

    What about an ssd raid 0. Of course you break the raid and follow the tut that the barefoot kid wrote and completely erase them with diskpart, then what before you combine the two ssd's, do you align them first or after you create the raid? My raid 0 is rating a 7.8 on the wei scale as of now but I'm not sure know after reading this that I have doubts now.
      My Computer


  7. whs
    Posts : 26,213
    Vista, Windows7, Mint Mate, Zorin, Windows 8
    Thread Starter
       #7

    seth, I am not 100% certain because I have never aligned a Raid0. But I would say, if you align them independently, you cannot go wrong.
      My Computer


  8. Posts : 968
    Windows 7 Ultimate x64
       #8

    Thanks whs appreciate the reply I will do that and use disk part after creating the raid to partition the raid for w7...also it makes sense you would do this before joining the two ssd's they would match perfectly, but it would probably be a good idea to do it again when the raid is created because the raid creation destroys all partitions...
      My Computer


  9. Posts : 1
    Windows 7 Professional x64
       #9

    chev65 said:
    I have a question, mine shows the 100MB mini default partition as the one with the 1024KB offset, and the 111GB partition having 101MB offset, it did this all by default. Is this right or not?

    It seems like the larger 111GB partition should be the one with the 1024 offset? I'm not sure if this matters or not.
    Yesterday I done a fresh windows 7 installation on my 64GB SSD. I was reading and following all these neat tutorials and I found this thread.

    After the installation completed I had my os partition with an offset of 101MB. I bought for 15 the Paragon Alignment Tool 2.0 hoping that it could fix the "problem" but actually it just told me everything was fine and the os partition was aligned perfectly. The only drive not aligned was the usb pen.

    At the end I asked for a refund (received within 30mins).


    Cheers.

    L.
      My Computer


 
Page 1 of 14 12311 ... LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 21:24.
Find Us