Windows SSD optimization guide

Discuss hardware, PC, laptop, software help... whatever.
User avatar
K4sum1
Lazy Owner
Posts: 829
Joined: 11 Jan 2021, 07:40
OS: Windows 8.1 x64
Has thanked: 515 times
Been thanked: 241 times
Contact:
United States of America

Windows SSD optimization guide

Unread post by K4sum1 »

This is basically a successor to this post.

Before you install Windows, set your computer to AHCI mode. Unless your computer is very old or very locked down, the option should be somewhere in the BIOS. This makes the SATA controller function like an actual SATA controller and is much faster for SSDs.
This may cause problems if you wish to use 2000/XP, but you can always just integrate your ACHI controller's driver or the generic driver, or use an ISO that already includes the driver. If Windows is already installed, the method to swap it is complex and can result in needing to reinstall. I suggest reinstalling anyways in this case.

Go to the Start Menu and right click My Computer (or if on 8+ open a explorer window and right click This PC) and select Properties. Click System protection on the left side. In the window that opens, click Turn off system protection, then Apply and OK. (For XP go under the System Restore tab in System Properties, and click Turn off system restore)

Then go one below, Advanced system settings. (For 2000/XP it's under the Advanced tab in System Properties) Under Performance click Settings, go to the Advanced tab, click the Change button. Untick Automatically manage paging file size for all drives. Click whichever drive has the page file,then click No paging file, and then click Set. You can set a custom page file on a HDD or less used SSD, or if you have a lot of RAM you can go without a page file entirely. Afterwards click OK, then OK, and then OK on the last window. (For 2000 it will pester you if you don't have a large enough page file)

Then Windows key + R, services.msc, enter/OK. Find these services and set them to disabled, Microsoft Software Shadow Copy Provider, Offline Files, Superfetch, Volume Shadow Copy.

Then one last tweak for Vista/7 users is to open the Start Menu, type defrag, and click Disk Defragmenter. In the Disk Defragmenter window, change the settings to disable Scheduled Defragmenting. 8+ is smart enough to optimize SSDs instead of defragmenting them, and 2000/XP is taken care of by the registry file.

Now run the two files attached to this post. In the second post there will be a list of each command and registry entry and what they do if you wish to pick and choose or manually apply them.

Sources:
https://board.eclipse.cx/viewtopic.php?t=71
https://web.archive.org/web/20150710065515/http://www.pcadvisor.co.uk/how-to/windows/windows-7-tweaks-for-modern-ssds-3374812/
https://web.archive.org/web/20131017235648/https://www.maketecheasier.com/12-things-you-must-do-when-running-a-solid-state-drive-in-windows-7/
https://ckirbach.wordpress.com/2012/11/13/how-to-optimise-windows-xp-for-ssd-solid-state-disk-operation/
Attachments
SSD.reg
(1.36 KiB) Downloaded 101 times
SSD (RUN AS ADMIN).bat
(434 Bytes) Downloaded 107 times
R3n who?

User avatar
K4sum1
Lazy Owner
Posts: 829
Joined: 11 Jan 2021, 07:40
OS: Windows 8.1 x64
Has thanked: 515 times
Been thanked: 241 times
Contact:
United States of America

Windows SSD optimization guide

Unread post by K4sum1 »

This is an additional post, there are three major differences between my post and the old post that I'd like to list here before we get to the commands.

I think there is no use for EWFTool. It appears to be a write caching program, which Windows can do anyways. I don't have any write caching tweaks or suggest using this tool because it can cause data loss in the event of a BSOD or power outage. The previous post suggests using it only to "Minimize disk writes", which does the same thing that my batch file and registry file do. If somehow I have missed any registry tweaks that this tool applies please let me know in the replies.

My registry file has LargeSystemCache set to 0, while the previous post has it set to 1. I've seen mixed suggestions for the setting, some sites suggest 1, others suggest 0. My reasoning for setting it to 0 is that it has to do with the Windows RAM cache. For reading files, modern SSDs are fast enough that it's not a problem. For writing, there's the possibility of a BSOD or power outage causing data loss. It may reduce writes in a few select scenarios, but I believe that data integrity is better.

You can use a TRIM program if you want for Vista and earlier. My post doesn't mention one because most modern SSDs have hardware TRIM anyways, so it's usually not necessary.

Now onto the batch commands:

bcdedit /set {current} graphicsmodedisabled on
bcdedit /set {current} SOS on
These two commands don't effect writing, but can make the bootup process faster. For 8+ it replaces the modern boot screen with the Vista one. For 7 and earlier it shows a boot screen with information on what files are loaded and other information about the system that is faster to show. Some systems may boot up slower with SOS on, lines slowly drawn instead of almost instantly getting to the next line, in this case set it to off.

fsutil behavior set disabledeletenotify 0
This enables TRIM on 7+. This functionality isn't in Vista or earlier, but it isn't too big of a deal because hardware TRIM exists anyways.

fsutil behavior set disablelastaccess 1
This disables the updating of the Accessed date field in Windows. This will save writing mostly useless metadata every time you access a file. This is disabled in 7+ by default if I recall correctly, so this only effects Vista and earlier.

powercfg -h off
This disables Hibernation and for 8+ Fast Startup as well. Hibernation writes the contents of the RAM to the C drive and basically shuts the computer off. Once turned back on Windows resumes by loading the Hibernation file back into RAM and you're back where you were. The only real use for this would be for laptops as a lower power state than sleep mode, but I haven't had it be an issue for me. Outside of saving writes it also frees a significant amount of storage. For 7 and earlier it's equal to the size of RAM in your system. For 8+ the size is usually smaller but still can be tens of gigabytes depending on how much RAM you have.

Now onto the registry tweaks:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction]
"Enable"="N"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout]
"EnableAutoLayout"=dword:00000000
These disable background defragmentation on 2000/XP.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"NtfsDisableLastAccessUpdate"=dword:00000001
Another way of disabling the updating of the Accessed date. See the text for the command for a more thorough explanation.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
"ClearPageFileAtShutdown"=dword:00000000
If you wish to have a page file this disables clearing it at shutdown. It can make the shutdown process faster and reduce writes on a SSD. It could be considered a security risk, but if someone already has your HDD or system (which they would need to access this file) you're already fucked.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
"LargeSystemCache"=dword:00000000
See the second explanation at the very top for detail.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters]
"EnablePrefetcher"=dword:00000000
"EnableSuperfetch"=dword:00000000
This disables Prefetch/Superfetch. It's unnecessary with a SSD. Prefetch basically fetches files the system thinks you will use and stores them in a place that is faster to access, which has no use on even a early SATA SSD and can cause unnecessary writes. Superfetch preloads frequently used applications into RAM making them faster to open, but again it has no use on even a early SATA SSD.
R3n who?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests