+ Reply to Thread
Page 1 of 31
1 2 3 11 ... LastLast
Results 1 to 15 of 462

Thread: Partition alignment importance under Windows XP (32-bit and 64-bit)..why it helps with stuttering and increases drive working life.

  1. #1

    Partition alignment importance under Windows XP (32-bit and 64-bit)..why it helps with stuttering and increases drive working life.

    New possible generic solution for stuttering and stalling under Windows XP (32-bit and 64-bit) by aligning the system partition and optimizing the Allocation Unit size for 4kb writes.

    BEGIN DISCLAIMER
    This solution is aimed at fixing the stuttering and stalling problem under Windows XP (32-bit and 64-bit) and is based on aligning the system partition on the disk and optimizing the Unit Allocation Size for 4 kilobyte writes. In theory this “fix” should result in a performance boost of around 10 – 15%. However, on my system (Thinkpad T60p (ICH7-M)) the performance increased with approx 300% (see benchmarks in post #2) and stuttering and stalling disappeared.

    Because of this discrepancy between theoretical and actual performance increase, I have chosen to term this solution as “possible” until others can confirm my findings on their systems (my theory is that the partition alignment reduces write overhead just enough so the SSD controller does not stall and that this is the reason for 300% increase (instead of 15%) in small file copy performance where heavy random writes are involved).

    UPDATE: Thanks to the information from Microsoft, provided by Tony, this fix is now confirmed to be working.

    UPDATE 2: Nice simple guide with pics located here: http://www.ocztechnologyforum.com/fo...221#post325221

    UPDATE 3: Use free Vista Recovery Disc (120 MB download) to align partition without needing access to second computer or temporary HDD:
    http://www.ocztechnologyforum.com/fo...56&postcount=3

    UPDATE 4: Microsoft finally admit alignment is top priority...http://www.ocztechnologyforum.com/fo...&postcount=161

    UPDATE 5: It would seem that choosing starting offset at 128 sectors (64kB) instead of 64 sectors (32kB) results in even higher performance increase. Text changed to recommend aligning partition at 128 sectors.



    As with my SteadyState fix, this solution is only proposed to those who are experiencing poor performance (stuttering and stalling) with their Core series drives. If your system is working well this fix is unlikely to result in significant performance increase.

    END DISCLAIMER

    This thread contains a possible generic solution to fix the OS stuttering and stalling under Windows XP (32-bit and 64-bit) that some users of the Core series v1 and v2 SSDs are experiencing. The stuttering and stalling seems to be related to random write performance (which is similar on all first generation MLC-drives) but it is unclear why only some users are affected by the problems.

    (This is the second solution I have found to the problem. Another solution is to install Windows SteadyState (see http://www.ocztechnologyforum.com/fo...ad.php?t=47183), which converts random writes into sequential writes. )

    This solution fixes the OS stalling and stuttering by aligning the system partition and optimizing the Unit Allocation Size for 4 kilobyte writes. For a background to this solution and some benchmarks, see post #2 in this thread.

    INTRODUCTION
    This solution is more complicated to implement than the SteadyState fix as it requires you to delete any existing partitions on your SSD (since it is not possible to align existing partitions with data on them). It will also require you to either access a second computer (to which you can connect your SSD and perform the partition alignment) or require you to have access to a second hard drive that can temporarily be used as system drive while you are aligning the partition on your SSD. (UPDATE - if your system has an optical drive, you do not need a temporary hard drive or access to a second computer. You can align the partition using the Vista Recovery Disc method http://www.ocztechnologyforum.com/fo...56&postcount=3)

    Once you have performed the partition alignment (and formatting) you can either do a fresh re-install of Windows XP or transfer back an existing Windows XP installation onto the aligned partition. However, both alternatives require you to first prepare the SSD, before proceeding further.

    As always, always make sure that you have a backup of your system and data before proceeding further. For the purposes of this guide, I will be assuming that you have an existing Windows XP installation already setup on your SSD and that you want to transfer it back to the SSD once the partition has been properly aligned (however, if you choose to do a fresh re-install you still can follow this guide until the partition cloning part). I will also assume that you have access to another disk drive that can be temporarily used as a system drive.

    GETTING THE TOOLS
    There are several ways to create an aligned partition on a disk. Vista’s Diskpart tool is capable of doing so using the “align” parameter when creating partitions. However, for the purposes of this guide I am assuming that you are running Windows XP. This will require you to download a utility in order to be able to create the aligned partition.

    You can either download Diskpar or Diskpart (both are command line tools). Diskpart is newer of the two and is more capable. However, Diskpar displays alignment properties in bytes, while Diskpart displays alignment properties in kilobytes. So if you really want to use Diskpart, you need to download Diskpar as well to be able to confirm that your partition really is properly aligned.

    Diskpar can be downloaded from: https://kb.wisc.edu/images/group14/4556/diskpar.exe

    Diskpart can be downloaded from: http://download.microsoft.com/downlo...part_setup.exe

    Please note that the Diskpart version hosted by Microsoft is an older version than the one used in Windows Server 2003 and Windows Vista. In the later versions of Diskpart, alignment is achieved by using the “Align” parameter while in this version alignment is achieved by using the “Offset” parameter.

    In this guide I will be using Diskpar.

    In addition to the partition alignment tool(s), you will need an appropriate drive cloning and/or shadow copy capable application. This is required for the transfer of the existing Windows XP installation into the aligned partition (if you do not want to do a fresh re-install). In this guide I will use the fully functional trial edition of Drive Snapshot. Drive Snapshot is able to restore an imaged system partition into an existing partition (without changing the partition offset).

    http://www.drivesnapshot.de/en/index.htm

    Finally, you will need an application that is able to generate a valid boot sector on your SSD should the previous one become damaged (or if you are implementing this fix on a completely new drive). MBRwizard 2.0 should be able to do the trick

    http://www.mbrwizard.com/download.shtml

    At this point I am assuming that you have done the following:

    1.) Made a full backup of your SSD (if you are planning to re-use your existing Windows XP setup). Preferably a full drive image by using your favorite drive imaging software (Drive Snapshot might actually not be the best one suited for this).

    2.) Made a full backup of your system partition of your SSD using Drive Snapshot. Just use the default settings of Drive Snapshot.

    3.) Gotten access to a second computer running Windows XP (or cloned your existing system to a temporary hard drive) and connected the SSD to it by SATA or USB.

    PREPARING AN ALIGNED PARTITION ON THE SSD
    1. First use Disk Management and delete all existing partitions on the SSD, since Diskpar requires an unpartitioned disk to operate on. Also take note of what disk number the SSD has in Disk Management, as it will be used as input in Diskpar. When you are finished, close Disk Management.

    2. Diskpar has two different modes of operation, either giving you information on existing partitions or creating new partitions according to your input.
    Fire up a command prompt and first run: “diskpar –i X”, where X corresponds to the disk number of the SSD from Disk Management. If you have selected the correct drive, Diskpar will say that there are 0 partitions on the disk you have selected.

    If you have selected the correct partition, run “diskpar –s X” and Diskpar and answer yes to the two questions asked by Diskpar. Then specify 128 as the start sector and select an appropriate size for the partition.

    Below is a copy of the output from running diskpar, where I have marked in red, the input made by the user

    C:\Install>diskpar -i 1
    ---- Drive 1 Geometry Infomation ----
    Cylinders = 4139
    TracksPerCylinder = 240
    SectorsPerTrack = 63
    BytesPerSector = 512
    DiskSize = 32041820160 (Bytes) = 30557 (MB)


    End of partition information. Total existing partitions: 0

    C:\Install>diskpar -s 1
    Set partition can only be done on a raw drive.
    You can use Disk Manager to delete all existing partitions
    Are you sure drive 1 is a raw device without any partition? (Y/N) y

    ---- Drive 1 Geometry Infomation ----
    Cylinders = 4139
    TracksPerCylinder = 240
    SectorsPerTrack = 63
    BytesPerSector = 512
    DiskSize = 32041820160 (Bytes) = 30557 (MB)

    We are going to set the new disk partition.

    All data on this drive will be lost. continue (Y/N)? y

    Please specify starting offset (in sectors): 128
    Please specify partition length (in MB) (Max = 30557): 30557

    Done setting partition.
    ---- New Partition information ----
    StatringOffset = 65536
    PartitionLength = 32041304064
    HiddenSectors = 128
    PartitionNumber = 1
    PartitionType = 7

    You now should use Disk Manager to format this partition

    C:\Install>



    3. Start up Disk Management and format the new partition. Format it as an NTFS disk with 4096 bytes in Allocation Unit Size and set it as Active.

    You have now successfully created an aligned partition optimized for 4 kilobyte writes! Now you need to transfer back your system onto the aligned partition (or re-install XP if you choose so).

    If you want to do a fresh install, remember to NOT repartition the drive during the Windows install process. Just leave the partition as its and select quick NTFS format.
    However, if you want to transfer your existing system to the aligned partition you need use Drive Snapshot and restore the saved system partition into your newly aligned system partition.

    Use Drive Snapshot to do so. If your aligned partition is larger than the Drive Snapshot image, you will get a question if you wish to resize the partition. Just answer YES and ignore any error messages at the end, should Drive Snapshot complain that it was unable to do so.

    If everything has gone according to plan, your Windows XP setup is now running on a system partition that is aligned with the SSD and the Allocation Unit Size is optimized for 4 kilobytes. In my case this boosted small file copy performance by 300% and eliminated stalling and stuttering,
    Last edited by therookie; 02-01-2009 at 11:21 PM.

  2. #2

    BACKGROUND
    In late November I got the opportunity to experiment with two Core Series V2 30GB drives. I wanted to find a solution to the stuttering and stalling problems that some users were complaining of and began to look into the problem and started to search for a solution.

    I found out that Windows SteadyState was able to resolve the stuttering and stalling problems by converting random writes into sequential writes and posted a guide. However, ever since coming up with SteadyState as a solution one thing has been bugging me. During my experiments, I used one Windows XP and one Windows Vista setup. Both setups were running an almost identical software suite but the user experience was dramatically different (before applying SteadyState).

    The Windows XP setup behaved as if it ran on a broken 4200rpm 1.8” HDD and no amount of tweaking could increase the performance to an acceptable level. It was only SteadyState that was able to resolve the stuttering and bring system responsiveness so that the setup really felt as if it was run on a fast SSD.

    The Windows Vista setup on the other hand was quite well behaved untweaked. After just disabling the page file, Superfetch and indexing (Windows Search service), the Vista system was almost on par with the SteadyState enhanced XP installation.

    Truth be told, I had expected Vista to perform worse than XP as I believed that Vista would engage in more background random writes than XP. However, my tests showed that XP was the performance dog of the two. After realizing that Vista was far superior to XP (at least on my setup), I tried to find out what the differences were that could result in such dramatic performance difference.

    One answer was given by Micron. They identified that Vista was much more efficient in filling the 4kb NAND pages as compared to XP
    http://www.flickr.com/photos/30013034@N00/3078710144/

    Another difference I found was that Vista aligned its partitions while XP did not. Partition alignment is something that has been recommended by Microsoft for database and mail servers and has been practiced since long by system administrators.

    http://www.microsoft.com/technet/pro....mspx?mfr=true

    The reason for aligning a partition with the underlying disk is to increase performance. In tests, aligned partitions achieved 34% better write performance in regards to 8kbyte blocks (benchmarks are however for SQL IOs and the tested system is a SAN).

    http://sqlblog.com/blogs/linchi_shea...alignment.aspx

    With this information, I proceed to test partition alignment on my Windows XP setup on a Core v2 SSD. To my pleasant surprise, the partition alignment not only eliminated my stalling and stuttering problems but resulted in performance increases of approx 300% when copying many small files and folder.

    [BENCHMARK #1 and #2]


    http://imagecloset.com/view19/f5fca3...benchmarks.JPG

    As you can see in the benchmark table, the performance increase on my system was very substantial. Although performance did not reach MFT or that of a SteadyState protected Windows volume, it still surpassed the reference 7200rpm HD by a wide margin. Performance also paralleled that of a non-Disk Protected Volume, running on disk where the system volume is Disk Protected by SteadyState.

    The similarity in performance between the aligned partition and the non Disk Protected partition on a SteadyState system is interesting. In my SteadyState guide I speculated that the reason a non Disk Protected partition had so much better performance than a normal SSD volume, was because SteadyState was converting random writes into sequential writes on the system partition. This would "free" up the Core drive enough to perform random writes on other partitions without the controller stalling.

    I believe that it is a similar effect here that is causing the performance increase. The partition alignment reduces the random write overhead enough for the controller to avoid stalls and thus the performance increase is not just equal to the write overhead reduced but that the controller does not enter into "stall" mode.
    Last edited by therookie; 12-27-2008 at 04:16 PM.

  3. #3
    SSD Section Moderator FZ1's Avatar Users Country Flag
    Join Date
    Nov 2005
    Location
    Cincinnati OH
    Posts
    857
    Mobo: Asus P6T Deluxe
    CPU: i7 920
    RAM: OCZ Gold 3 x 2GB
    Vid: Sapphire Radeon 5970
    PSU: "Name Brand" 1000 watt modular
    HDD: OCZ Apex 120GB / Vertex 30GB & many others
    OS: Win 7 Pro 64

    Most excellent! Very good job :thumbs:
    I am interested to see how well this works out for people.
    Joe

    I am not an OCZ representative and my opinions/views do not necessarily reflect those of OCZ or its affiliates.
    -----------------------------------------
    POWER SEARCH THE FORUMS W/GOOGLE!

  4. #4

    I am also working on a "companion" tweak to this tweak, that brought performance on my system almost up to MFT-level (in regards to small file copy performance in benchmark #1 and benchmark #2).

    Unfortunately, I have run into some hardware problems that I need to resolve before I can complete it. However, in the mean time I encourage anyone with a stalling or stuttering XP system to try the partition alignment to see if it resolves their problems.

    Also, the partition alignment is compatible with SteadyState meaning that if you combine the two you get faster commits to disk when restarting as well as faster SteadyState performance (approx 10%).

  5. #5
    Moderator m.oreilly's Avatar Users Country Flag
    Join Date
    Nov 2008
    Location
    between nothingness and eternety
    Posts
    3,635
    Mobo: tyan s5397
    BIOS: 1.05a
    CPU: dual quad xeons
    RAM: 12 gigs fbdimms
    Vid: ati 5850
    PSU: pc power and cooling 1kw
    HDD: 4x vertex/FW1.5/LSI9260-4i
    OS: server enterprise 2008 R2 x64

    well done i've known about the vista/server '08 alignment, and xp's lack thereof, though your results for xp/ssd are quite astounding (for hdd/xp/'03 non server operation, the lack of alignment is not nearly as noticeable, but under server conditions it becomes a necessity under high iops/small random access). again, great job and tutorial :thumbs:

  6. #6
    Disappointed Users Country Flag
    Join Date
    Dec 2008
    Posts
    229
    Mobo: ASUS M3A78-T
    BIOS: 0802
    CPU: AMD Phenom II X4 940BE
    RAM: OCZ DDR2 PC8500 4096MB KIT, Reaper HPC
    Vid: ASUS nVidia 9600GSO 512MB PCI-E 2xDVI
    PSU: OCZ GameXStream 700W
    HDD: 30GB Vertex 1199, dead 120GB Vertex 1199, 120GB Apex, 1TB SAMSUNG 7200RPM - HD103UJ
    OS: Kubuntu 0804

    Nice work

    But can't this be done simpler by using gparted? Eg by using a live-cd/usb?

    It should be able to resize/move ntfs/fat16/fat32 partitions.

  7. #7

    I only have limited experience of Gparted. If you are able to move partitions and you can select the exact offset the moved partition is to start at, then it would work.

  8. #8

    Good Job. Can I archieve the same performance boost simply by re-formating ssd by vista?

  9. #9

    Quote Originally Posted by m.oreilly View Post
    well done i've known about the vista/server '08 alignment, and xp's lack thereof, though your results for xp/ssd are quite astounding (for hdd/xp/'03 non server operation, the lack of alignment is not nearly as noticeable, but under server conditions it becomes a necessity under high iops/small random access). again, great job and tutorial :thumbs:
    I agree. The publicly available information in regards to partition alignment always focused on transaction intensive database uses. Also, most gains analyzed in regards to partition alignment were in the domain of enterprise RAID and SAN solutions.

    However, if you think about it the MFT of NTFS is nothing else than an file location and properties database itself. So, it is not that strange that XP would benefit from it. What is strange is that the performance increase is more than 10x as high as it theoretically should be. As I have stated, I believe that it stems from the fact that the partition alignment reduces the random write "pressure" on the SSD just enought to avoid the controller stalling.

    This presentation from Microsoft (aimed at the Enterprise market) is VERY useful in regards to knowledge about performance increases stemming from partition alignment.

    http://blogs.msdn.com/jimmymay/attachment/8999719.ashx

  10. #10

    Quote Originally Posted by bigboco View Post
    Good Job. Can I archieve the same performance boost simply by re-formating ssd by vista?
    In theory you would need to delete the partitions and then create a new partition from Vista using Diskpart and the "Align" parameter. Then you would format the partition and select Unit Allocation Size of 4096 bytes.

    I would recommend you to download the diskpar.exe utility. After you have performed your re-partitioning and reformat with Vista, you can run Diskpar to see that everything checks out.

    If the partition offset sector is evenly dividable by 4096, you should have an aligned partition.

  11. #11

    On a side note, when working with this tweak I discovered that most Drive Imaging software would not preserve the correct partition offset when you were restoring a drive image to disk.

    Also, some computer manufacturers that distribute restore CDs/DVDs that use custom software to re-install the computer to factory setup might result in a non-aligned partition.

    If you are experiencing problems under Vista, it could be a good idea to download Diskpart to see if your partition offset is evenly dividable by the selected Allocation Unit Size.

  12. #12
    Disappointed Users Country Flag
    Join Date
    Dec 2008
    Posts
    229
    Mobo: ASUS M3A78-T
    BIOS: 0802
    CPU: AMD Phenom II X4 940BE
    RAM: OCZ DDR2 PC8500 4096MB KIT, Reaper HPC
    Vid: ASUS nVidia 9600GSO 512MB PCI-E 2xDVI
    PSU: OCZ GameXStream 700W
    HDD: 30GB Vertex 1199, dead 120GB Vertex 1199, 120GB Apex, 1TB SAMSUNG 7200RPM - HD103UJ
    OS: Kubuntu 0804

    Quote Originally Posted by therookie View Post
    I only have limited experience of Gparted. If you are able to move partitions and you can select the exact offset the moved partition is to start at, then it would work.
    Yes you can move partitions with it, but I now see you can't select the exact offset, only to the nearest MiB. But it seems it by default offsets it in correct alignment, so then it may not be a problem. I don't have any SSD yet, and no ntfs/fat partitions or XP to test with.

    But if someone can test it out, and it works, the solution will be much simpler then the one you gave here.

  13. #13

    Thanks, I know what to do now. I suggest this solution be performed during factory setting. And a special partition creating tool will be really helpful to end users.

  14. #14
    SSD TIGER Tony's Avatar
    Join Date
    May 2003
    Posts
    9,176
    Mobo: various as always testing
    BIOS: various as they never work correctly
    CPU: usually AM3, but sometimes AM2+ and i7
    RAM: I test so much its hard to say
    Vid: 3870x2's...this is the one fixed variable
    PSU: PCPC 1200W/860W
    HDD: Vertex or Vertex EX
    OS: All M$ from XP forward

    here is a good read regarding W7 but it outlines what needs to be done to enhance SSD for windows. we have more tweaks to do thats for sure

    http://74.125.77.132/search?q=cache:...ient=firefox-a

    This is HTML version, for those looking to see the PPT look here: http://download.microsoft.com/downlo...T558_WH08.pptx

    Attached Thumbnails Click image for larger version

Name:	M$ssd.png
Views:	77917
Size:	27.5 KB
ID:	7832  

  15. #15

    Great info and confirmation from Microsoft regarding performance impact of partition alignment. I have now updated the text in the guide, stating that this is a confirmed and working solution.

+ Reply to Thread
Page 1 of 31
1 2 3 11 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts