Minimize writes to SSD disks with Windows 7

10

5

Most people use their SSD as their primary system installation disk with Windows 7.

W7 already has a lot of optimizations for SSDs, both in terms of performance and lifetime. Minimizing writes increases the lifetime of SSDs, so post each suggestion as an answer and let others vote on them.

Update:

I'm not sure anymore that minimizing writes is a good thing [tm], hard facts that SSDs will degrade within a noticeable time are missing and it seems this it can create a bit FUD about the functionality of the SSD. In other words: I question the usefulness of my wiki question.

mark

Posted 2010-06-01T18:53:11.350

Reputation: 1 722

Maybe modern SSDs won't degrade much from typical system activity, but what if you're running Windows from a cheap USB flash drive? i wouldn't necessarily expect them to have the kind of advanced ware-levelling firmware that SSDs have. so i think this question is still relevant in that case – Cauterite – 2017-05-17T05:10:19.643

1

We've written a post about this on the Super User Blog, see Maximizing the lifetime of your SSD.

– Tamara Wijsman – 2011-05-12T16:37:58.420

3This reminds me of way back when, when CDR drives first came out. People were paranoid about using them. People were so afraid of wearing out their purchase they never used them. The same thing is happening with SSDs. The whole point of these devices is to *use* them! The more you write to a SSD, the more you benefit from it. Its like a Ferrari, it stays shiny in the garage, but you cant go fast unless you actually drive it. – Keltari – 2011-08-23T12:31:10.943

Answers

5

Move the temp folders to other partitions

Each user has a designated Temp folder (e.g. C:\Users\<username>\AppData\Local\Temp) as well as there's the system wide one C:\Windows\Temp. Applications usually access them via the environment variables TEMP and TMP; so actually changing them is quite easy (at least system wide and for the current user).

mark

Posted 2010-06-01T18:53:11.350

Reputation: 1 722

4

Move the page file

Ensure that this is located on another partition.

Tommy

Posted 2010-06-01T18:53:11.350

Reputation: 303

2Wouldn't this negate a lot of the performance benefits you get from an SSD? If the swap file is on a slow normal drive, how does the SSD improve performance except for boot and program launches? – Console – 2010-06-01T21:44:09.667

Well.. I wanted to write this also but this applies to every answer here. Basically they are for paranoid reducement, not for using out a SSD. (people who wants to use a SSD like this should just choose a HDD. Same speed, etc with these.) – Apache – 2010-06-01T21:51:22.617

@Shiki: Yes I agree, it's about the paranoia wearing out the SSD. Should I put more emphasis on this in Q maybe? – mark – 2010-06-02T10:05:41.017

Well I don't really know. But seriously... how could they wear out? Basically with math, the numbers show 12year, 15 year of lifetime. Thats goddamn much. Even if you write the full amount of data every day, you get about ~5yr. And these numbers represent the 1-2 year old models. Don't think one should worry about it. Its like using a PC but fearing that it will break down once. Yes it will, its a PC. Like with a laptop, if you use it, the more it likely to break down once. – Apache – 2010-06-02T10:26:02.997

@Shiki: good comment, maybe the fear is spreading is due lack of knowledge .. it's hard to find quality facts about that. And if there would be, this question would be very counter-productive I admit. – mark – 2010-06-02T13:04:15.153

4

For the record, the Engineering Windows 7 blog specifically recommends putting the pagefile on the SSD. http://blogs.msdn.com/b/e7/archive/2009/05/05/support-and-q-a-for-solid-state-drives-and.aspx

– coneslayer – 2010-06-07T12:58:19.853

4

Disable hibernation (if not needed)

Hibernation has two main benefits: (relatively) fast booting from power-off; and the ability to continue working exactly where you left off. SSDs greatly improve the boot time and application launch times, which somewhat offsets the usefulness of hibernation.

The hibernation file must be on the boot partition, so it is a significant waste of space (assuming the OS is on the SSD). And permanently freeing as much space as possible can help improve the SSD's performance. It should also eliminate a significant amount of wear on the SSD, compared with hibernate being used often.

Hibernation can be disabled by typing the following in the Command Prompt (as administrator):

powercfg /hibernate off

sblair

Posted 2010-06-01T18:53:11.350

Reputation: 12 231

4Hibernation is not only for faster "boot", but keeping your work stuff in place so you dont have to open everything back again, so on. Much easier, better, and in my opinion would use smaller amount of IO than booting up from scratch but fix me. – Apache – 2010-06-01T21:50:10.390

@shiki I don't think you fully read my post; I listed two benefits of hibernation - the 2nd being the ability to keep working from an earlier state. And I would expect than writing several GBs (or whatever the memory content amounts to) every time you hibernate your PC involves significantly more IO (especially detrimental IO: writes) than a normal shut down + boot + re-opening all your apps/files. – sblair – 2010-06-01T23:01:43.930

@shiki But the convenience of hibernation still has merit (especially on an SSD with decent sequential read/write speeds, where hibernation should be faster than an HDD), which is why I put "if not needed" in the heading of my post. – sblair – 2010-06-01T23:53:10.437

4

Disable Prefetch

Turn off Prefetch on Windows 7. You already have great read performance with SSD, there's no reason Windows should unnecessarily write thousands of MBs in the sxs directory to make programs start faster.


Update the EnablePrefetcher registry key in your run-time image to:

Key:   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters
Name:  EnablePrefetcher
Type:  REG_DWORD
Value: 0

source

therat

Posted 2010-06-01T18:53:11.350

Reputation: 1

0

Move the event logs to another partition

The locations seem to be specified at

HKLM\SYSTEM\CurrentControlSet\Services\EventLog\<logname>\File (REG_EXPAND_SZ)

Where <logname> is System, Application, HardwareEvents, etc.

The default values are

%systemroot%\system32\winevt\logs\<logname>.evtx

You could also disable the "eventlog" service altogether, but probably not a good idea.

Cauterite

Posted 2010-06-01T18:53:11.350

Reputation: 373

0

Move the searcher index to another partition

The searcher index can get updated quite often, even more so if you've configured additional directories for effective searching (maybe also on other hard disks)

OTOH, if you use the searcher a lot you would actually want to benefit from quick access of the SSD so you might not move it off to a non-SSD drive.

I've been running the searcher on a non-SSD drive for the matter for a few days and changed it back. I got the impression the system never stops doing anything (audible noise from non-SSD drive) and that it takes much more time. I'm not sure anymore it's a good idea.

mark

Posted 2010-06-01T18:53:11.350

Reputation: 1 722