Maximizing the lifetime of your SSD

May 10, 2011 by . 33 comments

An SSD drive is a precious investment

An SSD drive is a precious investment, you don’t want your SSD to fail, do you?

So it is interesting to try to do things to increase it’s lifetime and see if it’s worth it. This is exactly what one of our fellow Super Users was planning to do, this user called caveman asked

How to prevent programs from killing my SSD in two weeks?

I just got my first SSD. And I have SSDLife monitoring in the background. After I have installed all software, and did some basic testings. SSDLife said “Total Data written, GB” = 52.1 (40GB used space, 70GB free space).

So, he only installed about 40 GB of data but there is already 52.1 GB written?

He found why this happens in a post which explains:

The problem with an SSD is, data is written in blocks. A block may be 256KB: 256 * 1000 * 8 binary digits. To change even ONE of these digits, you must rewrite the ENTIRE block. That is to say, your OS sees 1 bit being written, but the SSD wear is equivalent to 256KB being written: a 2.048 MILLION fold difference.

Which means that the formula

(SIZE OF SSD) * (Endurance Cycles) = Total data written to SSD before failure

is only for the best case scenario which would allow you to write 1,000 to 1,000,000 times the data of the drive before failure. But, looking at the average to even worst case, those are way more likely to occur with all those small writes going on on the SSD. This is confirmed in

What is the lifespan of an SSD drive?

However, the gist is that SSDs are more reliable than hard disks, and should last a good 20 years at least not counting performance degradation. — Answer by caliban

And that is what we could call an average case. You can do the numbers for the worst case if you want to, I can assure you that it doesn’t look good!

Let’s maximize the lifetime of our precious SSD by wear leveling and minimizing all those small writes to it, using simple and advanced techniques…

Make sure that TRIM is enabled

First, there is no sense in checking and trying to enable TRIM when your hard disk does not support it, this has been answered on Super User:

How do I know if my SSD supports TRIM?

The easiest way to know if your SSD supports TRIM is to use CrystalDiskInfo.

And exactly, this allows you to see if your SSD is supporting TRIM:

Now, the next step is to check if your OS is aware of the TRIM feature. For Windows 7, you can do this with fsutil behavior query disabledeletenotify. If this results in a zero, it means that the OS is using TRIM and thus is treated as an SSD.

In the case it’s not treating it as an SSD, you should do some troubleshooting by looking at the information in the Device Manager and the properties of the SSD. Perhaps you need to update the drivers of your disk controller in order for the OS to become aware of your SSD…

Disable or move unnecessary OS features

Our operating system has some features that write to the disk when the memory can’t hold it for some reason, alongside tricks that speed up your computer in case you have a HDD but are no longer necessary on an SSD.

Let’s look into the most important features that can cause issues and see if we could disable them. Be sure to read this three-part article too, it contains even more in-depth information on various space consumers.

Paging

The page file is meant to keep space free in the memory by swapping out memory data to the disk, this to ensure that the memory doesn’t get full when you run too much programs.

However, you might have a computer that only uses 2 – 3 GB of memory while you have 8 GB of memory. In such case, when you are sure your memory will almost never fill to 8 GB you can really spare out a lot of SSD writes by disabling the page file without any drawback.

When you do run out of memory (eg. if you run virtual machines), you don’t want your computer to thrash your SSD because of that…

So, there are two solutions:

Disabling the page file

  1. Right click ‘My Computer’ and click ‘Properties’.
  2. Go to the ‘Advanced System Settings’ tab.
  3. Click Settings in the ‘Performance’ fieldset, then go to the Advanced tab.
  4. Click Change in the ‘Virtual memory’ fieldset.
  5. Click on your SSD drive, select ‘No paging file’ and click ‘Set’.
  6. Click OK when you’re done.

Moving the page file

  1. First disable the page file as described above.
  2. Then, click on your preferred HDD drive, select ‘System managed size’ (unless you know what you’re doing) and click ‘Set’.
  3. Click OK when you’re done.

Make sure that you monitor your memory every now and then, you might be able to get around with creating a smaller page file on your HDD of only 1 – 2 GB.

There are a lot of Super User questions on disabling the page file, feel free to do more research to see what could be the best for you or just try it out.

Hibernation

Another feature that can be a pain is when you are hibernating the computer. If you really don’t need this feature consider to use sleep or shutdown instead, because it is writing your memory to the hibernation file every time you hibernate. If you reconsider to not use hibernation anymore then you can disable it by running the command

powercfg /hibernate off

as an administrator. This will disable the hibernation option and remove the hibernation file. It’s not possible to move the hibernation file.

SuperFetch and Defrag

(cfr. Steven noted in our comments that this is already done by Windows 7 if your SSD is detected and TRIM is on)

The manufacturers suggest that you turn both of them off, as your SSD doesn’t need defragmentation at all and it is fast enough which makes SuperFetch useless. Both of those do excessive small writes, which are unnecessary thus it’s better to just disable both:

  1. Disable the SuperFetch service.
  2. Make sure that the defragger isn’t scheduled, disable or remove defragment software. However, you don’t want to disable this for your HDD…

Search Indexing

Most people find the search indexer necessary, because it speeds searching up a lot for data that’s on your HDD.

If you only have an SSD, you might want to consider to disable the Search Indexer. If you have both, you should move the Search Indexer cache to your HDD. This will spare out a lot of writes so that whenever a file is being saved in one of your indexed locations the search cache is no longer updated.

Another option is to trim down your indexed locations so that things that you would never search or already know where they are never get indexed.

Temporary Files, Cache and Logs

There are a lot of temporary files, caches and logs on your computer. These also result in a lot of excessive writes! However, these depend on which browser and what software you use.

For example Google Earth keeps a cache of the images of the places you visited, so whenever you use Google Earth you are essentially writing images to your SSD. Let’s see in our next two sections how we can find those and use junction points when we can’t move or disable them.

Finding more writes with handy tools

(cfr. If you are using Linux or Mac OS X, there are some alternatives you could use.)

Resource Monitor

Let’s look at the built-in Resource Monitor in the newer versions of Windows:

  1. Type ‘Resource Monitor’ in the start menu and run it.
  2. Go to the ‘Disk’ tab.
  3. Sort the ‘Disk Activity’ by ‘Write’.

This will allow you to see an accumulation of the writes that are happening on your system, if you want more detail you’ll need Process Monitor.

Process Monitor

Let’s download Process Monitor from Microsoft Sysinternals and set up a filter on the writes:

  1. Download Process Monitor and run it.
  2. Click ‘Reset’.
  3. Make sure the new filter reads ‘Operation contains WRITE then Include’ then click ‘Add’.
  4. Optional: Filter by your SSD drive. Make sure the new filter reads ‘Path starts with C: then Include’ then click ‘Add’.
  5. Then click ‘Apply’ and then click ‘OK’.

Now you will see the writes occurring in real time, you can click an individual element if you need in-depth information. Under the menu ‘Tools’ there is a ‘File Summary’ which allows you to look at the whole set of writes in different tabs.

Warning: If you plan to let Process Monitor run in the background, then enable ‘Drop Filtered Events’ under the ‘Filters’ menu and perhaps decrease the ‘History Depth’ under the ‘Options’ menu. If you haven’t disabled your page file, Process Monitor will be writing to it. You can change this behavior in ‘Backing Files’ under the ‘File’ menu.

Can’t move folders away from the SSD?

Use junction points!

Junction points tell the system that when it’s accessing path X that it should access path Y instead. For example, this comes in really handy to tell it that if it wants to access C:WindowsTemp That it should access E:StorageCacheTemp instead.

For people that like the command line, there exists Junction for Windows and mklink for both Windows and Linux. The documentation clearly explains what parameters to use to create, list and remove junciton points.

However, what if you rather like to create Junction points from Windows Explorer? This is also possible! This Super User answer comes up with two tools that can do exactly that. If you like to script/program, check the question for an idea on what could be a better implementation if you have a lot of things you want to speed up but don’t have a big SSD.

Then, what should I put on my SSD?

You should place things that really require to load faster on your SSD, this is mostly your programs and games. Placing a video from your SSD will not give a noticeable speed-up in comparison with your HDD, nor do other personal documents result in this in general.

A lot of images will be loaded in quicker by a program like Adobe Lightroom, and a lot of music will be analyzed quicker by a DJ program like Traktor Studio; but the current SSD sizes aren’t meant for that purpose so for the moment that’s a bummer.

But pictures and music are a good example of things that you store only once if you aren’t planning to edit them, perhaps it will be fine to place those on your SSD in the future…

Feel free to read the comments below for more information and leave a message if you have additional hints, tips or tricks. Thank you for reading!

33 Comments

Subscribe to comments with RSS.

  • Caue Rego says:

    What all this tells me is: avoid the SSD for now! :P

    I just wonder how complicated this would be on a mac.

  • Andrew says:

    For most users, if you aren’t using your SSD for swap space, you’re losing out on a large amount of the benefit of the SSD.

    The failures you see reported for SSDs are rarely because of write cycles being exceeded.

    • Tom Wijsman says:

      You get no improvement for using your SSD as swap space when you have sufficient memory. While not much SSDs have failed for that reason for now, they most likely will soon fail for that reason too…

  • Kvad says:

    Get 3 years warranty on a SSD and then just run it into the ground ;)

  • [...] Maximizing the lifetime of your SSD – Tom Wijsman shares some excellent advice to help (if you are lucky enough) owners of SSD disks to ensure that they get the best lifetime out of the drive, highlighting a variety of configuration settings and features to enable and disable to keep unnecessary and damaging writes to a minimum. [...]

  • As far as I was aware, Win7 automatically disables defrag and SuperFetch when running on an SSD – if Win7 detected your drive as an SSD and enabled TRIM then it shouldn’t be using those services anyway:

    http://www.tomshardware.com/news/windows-solid-state-drives-ssd,7717.html

  • Tom Wijsman says:

    True, but but other operating systems might not and then there are those odd situations where detection doesn’t happen properly. Thanks for linking that article so people have more detail on how Windows 7 does this automatically for you… :)

  • Eric Malamisura says:

    Windows 7 will automatically disable SuperFetch, and Defrag on that drive when TRIM is detected. You should not recommend disabling defrag in its entirely, especially if you have a mix of SSD and HD, since the HD will most definitely need to be defragged on a normal schedule.

    The most important piece of information you are missing is to update the SSD Firmware, this will often substantially increase the lifetime of the drive.

    We can only hope Windows 8 will allow us to move the registry, and search indexing databases, etc. off to another disk so that we don’t toast our SSD drives.

    Per wikipedia: Windows XP, and Windows Vista do not support Trim. OSX 10.6.6 and Lion support TRIM. Linux 2.6.33 has support for it as well.

    Although based on the articles I have read, TRIM support will only slightly extend the lifetime of your SSD in any case.

    You should also run some serious backup software if you are using an SSD, it WILL FAIL and you will need a 100% fool proof backup mechanism. I suggest a Drobo combined with Acronis.

  • John L. Galt says:

    @Eric: Or, you could alternatively move all of your storage / settings / etc files an folders off the SSD – then, if it fails, it’s merely the time need to reinstall the OS onto the new drive.

    I use my SSD for my OS and programs. All of my Win7 special folders have been moved to a separate physical drive, and I install most of my games there as well. Since I have a pair of (identical) mechanical drives, I have split the swap file between the two, I have all of my downloads, file transfers, backups, etc on those two drives, leaving the SSD for OS and standard program files (Office, browser, etc. – and yes, even browser profiles are on one of the two mech drives).

    At the price of SSDs drop, they’re becoming more and more attractive for the sheer performance – but right along side that is the noticeable price drop in storage drives as well. If you have a desktop I highly recommend a multiple drive schema for your setup for this (among other reasons).

    @Tom – a good conglomeration of tips and tricks for SSD use – wish it had been around about 2 years ago when I got my SSD :P

  • [...] Maximizing the lifetime of your SSD [Super User] [...]

  • Tom Wijsman says:

    Eric: That’s indeed important, I’ll update the post to mention that alongside Steven’s suggestion. Please note that the Search Indexing database can be moved, check the Search Indexing options as you can change the location there. And if you don’t want to rebuild I would bet a junction point would do the job fine…

  • zvz says:

    What happens when SSD run out of life cycles? Everything crashes or like old hdd bad block appears?

  • Tom Wijsman says:

    zvz: The cells become unreliable. The wrong bits are getting stored, the data can become permanent or the cell can’t reliable remember the data anymore. I don’t know the exact thing that would happen but it all comes down that your data isn’t safe anymore, but it doesn’t necessarily crash. So yes, bad blocks would appear…

  • lukatar says:

    you can extend your ssd’s lifetime by hanging it on the wall in your room and watching it every morning you wake up. Furthermore, everybody can see easier that you have an ssd. On your computer just use your old hdd

  • Phil Robins says:

    Solid State Disks improve the performance of your PC so much that it’s easy to tweak these settings as the instructions on blogs like these are clear and easy to follow – this gives your SSD it’s maximum chance of longevity. IMHO I don’t believe any SSD has failed yet through wearing out – any failures will have been through some other reason. Quite often it’s probably due to an incompatibility problem.

  • Chris S says:

    Anyone saying that SSDs don’t fail obviously hasn’t been around very many of them. The majority of them are fine for years. There are plenty though that die rather quickly. We run them in most of our work laptops; we’re averaging one dead every quarter.

    They die spectacularly, not read/write errors, but they simply no longer work (completely bricked). You should be running a backup solution anyway, but certainly more so if you are relying on a SSD.

  • Matt says:

    I have a new Solid State drive that I installed Windows 7 on, Works great…only it claims to be storing twice the data that it actually contains. So I have a 60 gig drive with 42 gigs taken up by windows 7. Anyone had a similar problem with a SSD?

  • Dave Black says:

    Two important things to note about disabling or moving the System Page File:

    1. Windows requires the use of a System Page File to create a memory dump.
    2. The System Page File must reside on the same logical/physical drive as the OS to create a memory dump.

    Thus, you will no longer be able to capture a memory dump should the OS crash. If you know how to use WinDbg, you can easily open the dump to find the problem. I’ve debugged memory dumps to find bad drivers, etc.

  • keltari says:

    All this talk of maximizing SSD lifespan reminds me of when CD recorders first came out. Somehow people thought they had low MTBF (mean time before failures). I never saw any documentation supporting those claims. People were so afraid of wearing them out, that they didnt use them. This behavior defeats the purpose of buying them. Today, people have the same mentality with SSDs. Yes, new technologies are expensive. Yes, using SSDs will wear them out (albeit really slowly). So quit worrying about all the little things and enjoy the speed of a SSD.

    Also, people dont seem to realize there is a huge world of difference between drive failure and wearing out the SSD.

  • Benjamin says:

    I’ve been absolutely abusing (i.e. using it for its intended purpose) my generic Sandforce 1200 series 60GB SSD since October of 2010 (5300+ hours of uptime, original firmware on the drive, etc…). Based on all of the warnings, I did go through and ensure that Windows 7 was handling the most basic settings for the drive (i.e. TRIM, no defrag, etc…), but left things otherwise untouched. I’ve had absolutely no issues, am still blown away by the performance of the computer, and rely on it 100% for my OS, programs, and files on my work laptop.

    Obviously, keep a backup, as you should with any mechanical drive – but otherwise, as long as you’re running Windows 7, just install and reap the benefits of nigh instantaneous seeks and blazing read/write speeds, and take all of the worriers with a grain of salt.

  • Keith Golon says:

    It will be nice once these ssd disks are ready for consumer usage. The bugs worked out.. That sort of thing. Right now there is too much fiddling and worrying about settings to be “recommendable” for the day-today user.

    It will also be welcome (if it ever happens) to see consumer drives better engineered instead of teetering on failure with every read. There’s far too much reliance on the controller’s ability to interpret and correct multi-bit errors coming from the storage array.

    Just make the NAND array reliable and be done with it.

    • Milind R says:

      I rather prefer this kind of tech to be unreliable this way. They are cheap enough in small sizes to be affordable every year.

      Average users are not the only kind of users. If they want to use an SSD, they can learn what should be done for using it best. I don’t see why it will be any nicer when they are ready for “consumer usage”. They will probably be locked down and void of any real tweakability just for that purpose. I say, let it stay unreliable enough that it’s not a fit-it-forget-it solution. Keeps products exciting, and innovation going.

  • Howard says:

    I disabled the page file in Win 7 64-bit on my OCZ 512GB SSD. The system froaze. Had to shut down and restart using the power button. When the system restarded, the page file was again automatically being managed. I afraid to change it again.

  • Chris says:

    I just got a Samsung 830 and am wondering how concerned I should be beyond performing basic optimizations that the software that comes with the SSD takes care of (trim/defrag/etc). I have considered using a junction to offload my c:\users directory to my d: drive. However, if space isn’t the issue how worried should we be about all our appdata, cache, and temp files affecting reliability on our SSD. Aren’t we negating some of the benefits of these oft used files by placing them on the hdd? According to Samsung the 830 has a lifespan of 16 years with a daily write of 50gb. If all we expect is 3 or 4 years maybe it’s time to relax.

  • Tom Wijsman says:

    Chris: You’re better of creating a memory cache to place such folders on than a SSD, I don’t think there’s any benefit at a SSD for write-once read-only-a-few things. AppData, Cache and Temp are exactly the folders you can just keep in memory…

  • i just ran f”sutil behavior query disabledeletenotify” on my laptop with SSD and it returned “Disable Delete Notify = 0″ Then i ran in on my laptop with a standard sata disk drive (not SSD) and it gave me the same result.. so leaves me confused about how accurate that result it.

    I just put in a samsung 256GB 830 series .. which seem to be the highest rated (at least on new egg and amazon) and it seems to be running hot. Fan runs at high speed, then my laptop periodically shuts off to avoid overheating. Not sure if its just a faulty drive. This happens consistently when watching YouTube / CNN video online. Joe

  • Is this article still valid for Windows 8?

    • Cesar says:

      I wish to know the same. Any way, I’ll try to follow this as much as possible for now. Searching for .log and *log files will be the periodic and hard part to maintain, as the system keep evolving and changing … I wonder how much this is important.

  • This article is full of misinformation. Disabling the paging file is pretty much asking for problems, and moving it to a mechanical drive is wasting the whole point of having a SSD.

    Let me be quite clear: the page file is used quite regularly, EVEN if you have 32GB of RAM or more.

    • Krayzar says:

      While I agree with you that disabling the page file isn’t a great idea in most cases, I don’t agree with your broad assertion that “This article is full of misinformation”.

      What else do you view in this article as misinformed?

      On the page file in general, I personally use my laptop’s SD card slot as page file storage and it works quite well with a high speed SD card. This solution may not work for everyone I realize.

  • Leave a comment

    Log in
    with Stack Exchange
    or