Why Windows 10, 8.1 and 8 defragment your SSD and how you can avoid this

Blog

How disk optimization works in Windows 8+

You can type dfrgui on the Start screen to open the disk optimizer. It runs the defrag.exe utility to defragment HDDs on schedule, same as in Windows 7. This tool has been rebranded in Windows 8, because there’s a new feature now for SSDs.

Windows 7 sends TRIM commands to an SSD when files get deleted. Windows 8 takes it one step further by also sending TRIM commands for the entire SSD volume when the PC becomes idle. This action takes just a few seconds.

The ScheduledDefrag task is responsible for carrying on this assignment. The absence of visible triggers indicates that it operates under the umbrella of automatic maintenance.

This is another new Windows 8 feature primarily aimed at improving power efficiency and extending battery life in mobile PCs. It bundles all maintenance tasks and runs them under the high performance plan right after a plugged in PC becomes idle.

The real culprit is the ScheduledDefrag task, but the problem surfaces during automatic maintenance. Have you experienced it? Let’s see!

Is it good to disable Superfetch?

Most users should keep Superfetch enabled because it does help with overall performance. If you aren’t sure, try turning it off. If you don’t notice any improvements, turn it back on.

Video

Is Microsoft aware of the problem?

A better question is whether the right product group is aware. It could’ve been, but… Here’s a case in the Answers forums, but the poster is sent away to the TechNet forums by the support engineer. Here’s a different case in the TechNet forums that basically dissects the problem, but it’s not given any attention from Microsoft.

These forums threads are not new by any means, yet the problem is still reproducible… I’ve raised a defect on Microsoft Connect, but at this time I have no indication that it’s been forwarded to the product group. I’ll keep you posted.

Upd. (Feb 2014). I’m pretty sure that my bug report never reached the product team and now I know it never will.

Should you defrag an SSD?

You’ve likely heard before that you should never defragment your SSD. Conventional wisdom says not only do solid state drives not need defragging, doing so would cause unnecessary writes to the drive. This is only partially true. In fact, Windows does sometimes defragment SSDs—on purpose.

How long will my SSD last?

Current estimates put the age limit for SSDs around 10 years, though the average SSD lifespan is shorter. In fact, a joint study between Google and the University of Toronto tested SSDs over a multi-year period. During that study, they found the age of an SSD was the primary determinant of when it stopped working.

Power Loss

  1. Your computer is relocating data on the hard drive by erasing it and rewriting it during a system defragmentation. If the computer loses power during a defragmentation process, it can leave parts of files incompletely erased or rewritten. This causes the files to be corrupted and they may not be recoverable. If the corrupted file belongs to a program, this program may cease working altogether, which can be a huge problem if it belongs to your operating system. If an operating system file is corrupted, there's a chance that you'll have to reinstall the operating system to be able to use the computer again.

Defragmentation

Defragmentation is nothing more than arranging all the pages/sectors together in order so they’re close to each other. In a perfectly defragmented disk, the sectors of each file would be in an orderly sequence one right after the other, just like the pages in a book.

Now, unlike the pages of a book strewn about your home, disk sectors are a little more limited in how they can be laid out. In order for the sectors of one file to be arranged in order, other files or fragments of files may have to be moved out of the way to make room.

In fact, that’s what a defragmenting tool spends most of its time doing: moving files around on the disk to make room so other files can be laid out in order.

It’s also one of the things that differentiates one disk defragmenting tool from another: some are simply better or more efficient at moving things around as little as possible, so as to be done as quickly as possible with a result that’s as acceptable as possible.

But do I need to defrag?

Probably not.

In the past, the answer was a pretty clear “yes”, but things have changed.

  1. Solid State Drives (SSDs) should not be defragmented. The delays defragmenting seeks to reduce have to do with the hard disk’s read/write head physically spinning over magnetic material. Movement takes time. In SSDs, there is no movement, so there’s no practical advantage to sectors being logically adjacent. Solid state memory wears out the more you write to it, and not only does defragmenting write to the disk a lot, but the technologies used in flash-based drives to spread the wear and tear over the entire device also often hide the actual physical location — so sectors that might appear to be adjacent actually are not.3
  2. Windows  versions 7 and later do it for you. There’s an automatically scheduled weekly task to defragment your hard disks. Once a week is just fine, and you need do nothing more.

So if either of those things are true — you have SSDs or you run Windows 7 or later — you need do nothing.

If, however, you’re running something earlier than Windows 7 or you suspect that the once-a-week schedule might not be enough, and you have a traditional hard drive, then manual defragmenting might be worth a shot.

What does optimize drives mean?

Disk Defragmenter helps to improve performance by optimizing your hard drive. It works by making data needed by the operating system faster to find.

Photo in the article by “Flickr” https://www.flickr.com/photos/gsfc/5333202438

Tags