How to optimise Windows XP for SSD (solid state disk) operation
Optimise Windows XP for SSD drives
I have been searching a lot on this topic and found tons of information. I am giving a brief summary, hoping someone will find it useful. Being an electrical engineer, I feel confident in sharing valuable information. First of all, if you have not installed XP yet, read below about partition alignment and file system settings. Forget about all those people asking you to upgrade to a Windows release newer than XP. Feasible SSD “support” in Windows XP is likely not as bad as many claim. There is one thing missing tough, which is native support of the SATA TRIM command in Micosofts file system drivers. And I do not expect them to add it ever. TRIM helps telling the SSD which file system blocks are no longer in use, so that its internal mechanisms can work more efficiently. Google if you want to learn more about this topic. The garbage collection integrated into most SSD drives will eventually reclaim those at some point, tough. Some vendors provide tools that give some sort of TRIM support (Intel: SSD Toolkit, OCZ , Samsung: SSD Magician) . By the way, never use defragmentation tools on SSD media, it is absolutely futile! Second, there is lots of potential to improve Windows XP behaviour. At its time of creation SSD drivers were basically unknown. We need to tweak just a few settings and XP will play much more nicely with SSD drives. You basically disable all extras that were brought in place to speed up data access on mechanical hard drives, because it hampers with the nature of SSD drives. Alternatively, you can use some freely available programs like SSD Tweaker. They basically do the same settings.
Now, lets get to business: adjust system settings
The quickest way is to do the steps below is by downloading my optimisations from this location (Windows-XP-SSD-optimisations.zip). Save the file somewhere, unzip it, and then double-click on the .reg file. You will need to confirm the changes to the system registry. It will do below four crucial settings in the Windows registry in one step. Or do them manually. Open the Windows registry editor (Start->Run->”regedit”) and set the following keys (If you are not familiar with using the editor, please use your favourite Internet search engine and read about it. It is not difficult at all.):
- Disabling background disk defragmentation
Key Name:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction\ Name: Enable Type: REG_SZ Value: N
- Disable Background auto-layout:
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout Value Name: EnableAutoLayout Type: REG_DWORD Value: 0
- Disable update of filesystem’s “last access timestamps”
“Key Name: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem Name: NtfsDisableLastAccessUpdate Type: REG_DWORD Value: 1
- Disable Prefetch
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters Name: EnablePrefetcher Type: REG_DWORD Value: 0
- Optionally: Go to the system settings and disable the swap file (pagefile) unless you are very low on system memory, and disable the system restore service unless needed. You can also move the temporary and log files directories away to non-SSD media if available, see below.
Now, close the registry editor, reboot and you are done. Easy, wasn’ t it? Remember not use defrag utilities on SSD disks! For additional details, please refer to – http://msdn.microsoft.com/en-us/library/ms912916(v=winembedded.5).aspx — Some of above information is collected from there.
Partition alignment
Align your partitions so that they start and end at 4k disk blocks. E.g. read this post on Anandtech. Any modern partition tool will do this automatically. I recommend GParted. However the Windows XP partitioner is old and will do this wrong in most cases. The reason is that modern drives, including SSDs and hard disks, operate on 4k data blocks at a time. If the partition is misaligned all partition blocks stretch across disk blocks. If a partition block is processed the drive will need to actually process two disk blocks! This slows disk operations down.
File system settings
If you format the partition, make sure to set the file system allocation block size to 4k. For XP, it is best to choose NTFS as the file system and 4096 as the Allocation Unit Size, check Quick Format, and hit “Ok”. Am I missing something crucial? Please tell me, it will be appreciated.
great explanation, thank you 🙂
I thought its better to have Fat32 because it has less metadata…
A few bytes of metadata per file is not an issue these days, as drive space is cheaper than ever. NTFS is superior in security and probably performance. Journaling is an example feature that reduces or prevents data loss.
I use hdd and ssd together.. if i edit reg according to your recommended setting. will i gain ssd better performance but get worse hdd performance?
In either case, you will never get better SSD performance. Your SSD can only “live longer” by reducing disk writes to it.
If the Windows system partition containing the \WINDOWS folder in on your SSD (which is most likely), then you should apply the configuration. it will reduce futile disk writes and data movement.
The HDD containing other data will keep the same speed.
In the unlikely case that your windows system partition with \WINDOWS is on your HDD, you should _not_ apply the settings.
Will these procedures allow windows XP to actually see the drive? The ssd drive appears in the bios but windows XP can’t see it.
Your problem is off-topic and not related to my guide.
My guess is you need to create a partition on your SSD with a file system known to Windows XP. Use your favourite search engine to see how to do that.
is there a new link for the .reg file, the one in this article appears to be broken
Thanks for pointing this out. I have updated the link. Press ESC to skip the dropbox registration prompt and it should download.
Does the .reg file work with windows xp Professional 64 bit edition?.
Sure.
DUDE!!! Your awesome…from 1 very tired computer geek to the electrical engineer thnx from the bottom of my heart
I am going to update my old DELL Inspiron 1501 with a new SSD drive, but using a DVD craddle (this is because the current hard drive is SATA, not SATA III). I’ll follow your instructions. Seem very reasonable and somehow match what I already know about the old OS and the new SSD drives. Thanks for the post.
I know this is old but the reg file link is not working again
Yap thanks for reminding. Dropbox deleted my file and threatened to sue me because of copyright violation. My complaint was never answered. They did not even bother to look at the file, otherwise they would have noticed their claim is absolute bullshit. How can a 1k file be copyright infringement?
Anyways I moved to a European file hoster and updated the link.
Thanks a lot man.
Hi there, is there a reg file made to reverse the operations listed? I have applied the optimization .reg file and videos are stuttering now. Thank you.
Thank you very much
Thank you very much for the very usable summary.