How Important is Partition Alignment ???

Page 1 of 2 12 LastLast

  1. Posts : 514
    Windows 7 Pro x64
       #1

    How Important is Partition Alignment ???


    As if my poor numb skull didn't have enough stuff floating around in it, I discovered that there was such a thing as partition alignment.

    I Google-searched it and everything I came up with was way over my head and seemed to be more oriented toward Windows 2003 and 2008 "servers", and I don't know what a server is.

    I did find a formula for determining if one's partitions were aligned and did the math, dividing some number by 4096 to see if it came out even; it did not, having a remainder of 1024.

    My understanding is that discs are comprised of 512-sized blocks and and one wants the stuff stacked atop these blocks to align at every fourth joint.

    Is partition alignment something I need to worry about ?

    Thanks.
      My Computer


  2. Posts : 259
    Win7 sp1 Pro 64bit / XP sp2 Pro (games only)
       #2

    Enter ALIGN SSD in search window at top of this page. Lots of good reading.
    Art.
      My Computer


  3. Posts : 20,583
    Win-7-Pro64bit 7-H-Prem-64bit
       #3

    Hi,
    You can run this and post a screen shot of the results
    Show us your SSD performance 2 - Windows 7 Help Forums

    If you see red x's on the top left you can use free mini tool to align the partitions
    Best Free Partition Manager for Windows | MiniTool Partition Free

      My Computer


  4. Posts : 514
    Windows 7 Pro x64
    Thread Starter
       #4

    Does this pertain to HDDs as well ?
      My Computer


  5. Posts : 396
    Windows 7/8.1/10 multiboot
       #5

    BuckSkin said:
    Does this pertain to HDDs as well ?
    It can. The crucial factor is whether the disk is an "Advanced Format" type. Not all HDDs are AF (though probably anything 500GB+ almost certainly is), and AFAIK all SSDs are AF, regardless of size.

    Traditional disk drives have long used storage allocation units (sectors) of 512 bytes ... long enough that operating systems came to assume that and hard-coded that value into their disk access routines. For various engineering reasons tangential to this discussion, drive manufacturers have switched to using allocation units internally (inside the drive itself) of 4096 bytes.

    However, older OSes (Win7 and earlier) were designed to expect 512-byte sectors, so for backward compatibility many drive manufacturers use drive controller firmware that makes each internal 4KB sector appear to the outside world as eight 512-byte sectors. These types of AF drives are known as "512e" (emulated 512-byte), while AF drives that do not have 512e controllers are often called "4Kn" (native 4KB).

    The reason this matters is that all drives can only read/write full sectors at a time, so if the OS wants to write/rewrite a single "fictitious" 512-byte sector, an AF-type drive would have to write an entire 4KB "real" sector without changing 7/8 of it. That requires the drive to read into a cache the relevant 4KB sector from the disk, alter the 1/8 of the cache copy the OS wants changed, then rewrite the full 4KB cache back to the disk.

    As inefficient as that may sound, it's not all that bad because modern OSes (XP and up) and file systems (NTFS) never read/write one 512-byte sector at a time anyway; they're designed to read and write in 4KB blocks--i.e., what they perceive as 8 sectors at a time. This is ideal for AF drives, provided the 8 512-byte sectors the OS wants to access line up exactly with a single AF sector on the drive.

    To illustrate the impact of misalignment, consider what happens if the 8 sectors an OS wants to write span, let's say, the last four 512e sectors of one AF sector and the first four 512e sectors of the next AF sector. To write those 8 512e sectors, the drive controller would have to read and cache *two* AF sectors, save half and modify half of each one, then write both AF sectors back to the disk.

    Contrast that with a properly aligned partition, in which no read-and-save would be necessary and the 8 512e sectors can be written straightaway to a single AF sector.

    As you can see, that can drastically affect disk performance. So yes, partition alignment is important when using modern hard disks. The performance hit is even more dramatic with SSDs because TRIM and "garbage collection" come into play, whereas those technologies aren't a factor in traditional magnetic HDDs.

    Many tools can be used to determine if your partitions are already aligned. To keep things simple, let's stick with ThrashZone's suggestion of MiniTool Partition Wizard--which is an excellent, all purpose partitioning tool anyway. Right-click on any given partition and select "Properties". In the Properties window, select the "Partition Info" tab. Note the values for First Physical Sector and Last Physical Sector.

    A properly aligned partition will align on 1MB boundaries (2048 512e sectors). So take the First Physical Sector value and divide by 2048. If it's an exact multiple, the front of the partition is aligned. Take the Last Physical Sector plus 1, and divide by 2048. If it's an exact multiple, the back of the partition is aligned. Repeat for each partition.
      My Computer


  6. Posts : 514
    Windows 7 Pro x64
    Thread Starter
       #6

    dg1261 said:
    Many tools can be used to determine if your partitions are already aligned. To keep things simple, let's stick with ThrashZone's suggestion of MiniTool Partition Wizard--which is an excellent, all purpose partitioning tool anyway. Right-click on any given partition and select "Properties". In the Properties window, select the "Partition Info" tab. Note the values for First Physical Sector and Last Physical Sector.

    A properly aligned partition will align on 1MB boundaries (2048 512e sectors). So take the First Physical Sector value and divide by 2048. If it's an exact multiple, the front of the partition is aligned. Take the Last Physical Sector plus 1, and divide by 2048. If it's an exact multiple, the back of the partition is aligned. Repeat for each partition.

    I know that took a lot of typing and I appreciate it.

    It will take me a bit to digest it all, but I will.

    I followed a path to find my "Partition Starting Offset", a huge number that I then divided by 4096; the instructions I was following said that things were okay if it divided with no remainder; my number ended up with a remainder of 1024, twice the 512 and 1/4th the 4096.

    Are you familiar with that test ?
      My Computer


  7. Posts : 396
    Windows 7/8.1/10 multiboot
       #7

    I'm not familiar with what instructions you may be following, but if they have you dividing by 4096 then it sounds like they're using multiples of bytes rather than multiples of sectors. That's okay, provided they choose the correct divisor. (Using bytes is not an altogether crazy approach--the Windows registry itself actually indexes partitions by their byte location instead of sector location.) Since sectors are universally assumed to be 512 bytes, doing the math with byte values isn't any different except for the divisor to be used.

    Unfortunately, a divisor of 4096 is not correct. That will tell you if things line up with the 4KB boundaries of individual AF sectors, but a properly aligned partition is more than that. It lines up on 1 MB boundaries--that is, 2048 512-byte sectors (or 256 AF sectors), not just on single AF sector boundaries.

    A properly aligned partition is aligned on 1MB boundaries instead of 4KB boundaries to facilitate Windows working more efficiently with huge gobs of data, megabytes at a time--such as the MFT, page file, and hibernation file.
      My Computer


  8. Posts : 514
    Windows 7 Pro x64
    Thread Starter
       #8

    ThrashZone said:
    Hi,
    You can run this and post a screen shot of the results
    I was a bit uncertain which product you are meaning; is HDTune the one I should use; if so, does the free version accomplish what we are after ?


    I went ahead and downloaded the MiniTool Partition program.


    Thanks.
      My Computer


  9. Posts : 20,583
    Win-7-Pro64bit 7-H-Prem-64bit
       #9

    BuckSkin said:
    Does this pertain to HDDs as well ?
    Hi,
    No it is only for ssd's
    I don't believe a hdd would matter if it was aligned or not
    About all I ever do is make sure partitions are an even gb # except for any system reserved partition which i leave alone if they exist.
      My Computer


  10. Posts : 514
    Windows 7 Pro x64
    Thread Starter
       #10

    ThrashZone said:
    About all I ever do is make sure partitions are an even gb # except for any system reserved partition which i leave alone if they exist.
    Thanks !
    Do you mean "even GB # " as in 2 or 4 or 6 or 8; or do you mean so long as it is not a fractional number ?
      My Computer


 
Page 1 of 2 12 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 04:02.
Find Us