windows 8/8.1 scheduling disk degrag on ssds by default

siccmade 11

Weaksauce
Joined
Dec 18, 2010
Messages
79
I wanted to get an idea of what the new disk optimizer was doing for SSDS in window 8/8.1. After some research I discovered the the task "ScheduledDefrag" is including ssd's by default after a fresh install or upgrade to windows 8/8.1, After searching for the topic online i came across this site that confirmed what I was seeing. http://www.outsidethebox.ms/why-windows-8-defragments-your-ssd-and-how-you-can-avoid-this/ Even though I know not to run disk defrag on ssds and never have windows, 8/8/1 was running it anyway. By default windows 8/8.1 claims to defrag HDDS and run trim commands on SSDs but this is not what is actually happening. Here is a log file i generated of what the task was actually doing :

TimeGenerated : 12/8/2013 1:25:10 AM
Message : The storage optimizer successfully completed retrim on (C:)

TimeGenerated : 12/8/2013 1:25:10 AM
Message : The storage optimizer successfully completed defragmentation on
(C:)


TimeGenerated : 12/8/2013 1:25:02 AM
Message : The storage optimizer successfully completed defragmentation on
(E:)

TimeGenerated : 12/8/2013 1:25:00 AM
Message : The volume System Reserved was not optimized because an error
was encountered: The parameter is incorrect. (0x80070057)

TimeGenerated : 12/8/2013 1:24:59 AM
Message : The storage optimizer successfully completed retrim on New
Volume (D:)

TimeGenerated : 12/8/2013 1:24:59 AM
Message : The storage optimizer successfully completed defragmentation on
New Volume (D:)


Disk C and D are SSDs while disk E is a HDD. As you can see disk optimizer is sending trim commands as well as defragging both my SSDs. The above link has a workaround to stop windows 8/8.1 defragmenting your solid state drives. Apparently Microsoft has been made aware of this since the early stages of windows 8 but has yet to release a fix....
 
Just gotta go into the setting to turn that stuff off, tho on my install it was turned off by default..
 
Is the SSD actually in the list of disks to be defragges?

1)Open Disk Defragmenter
2)Click the Configure schedule button
3)Click the Select disks button
 
Is the SSD actually in the list of disks to be defragges?

1)Open Disk Defragmenter
2)Click the Configure schedule button
3)Click the Select disks button

yes that will stop the defragging but you will no longer receive Trim commands from windows
 
On my 8.1 system it was also turned off by default.

I'm only seeing trim/optimize.

did you run a log report and actually go in and look what its doing.
"The storage optimizer successfully completed defragmentation on Drive C and D (both solid state drive)
 
i would have never known without the log report. and it is indeed defragging ssds. i confirmed it on three other builds running 8.1
 
Windows 8.1 does not automatically defrag SSDs. It's smart enough to tell the difference; its automatic maintenance on SSDs is just garbage collection. It's not defragging unless you specifically tell it to.
 
did you run a log report and actually go in and look what its doing.
"The storage optimizer successfully completed defragmentation on Drive C and D (both solid state drive)

No but now you've got me worried.

I'll be checking when I get home tonight.
 
Last edited:
My SSD shows up in the defrag schedule, just like the HDD, however, at the time specified, I see it actually run and hit the HDD, but the SSD does not seem to go through the defrag process, unless it does it like faster than 1 to 2 seconds. But when I look at the logs and the last time defrag was run on a drive, it shows that it did run. I wonder if its just a reporting thing or something...
 
My SSD shows up in the defrag schedule, just like the HDD, however, at the time specified, I see it actually run and hit the HDD, but the SSD does not seem to go through the defrag process, unless it does it like faster than 1 to 2 seconds. But when I look at the logs and the last time defrag was run on a drive, it shows that it did run. I wonder if its just a reporting thing or something...

It detects if the drive is an SSD and runs garbage collection, not defrag.
 
It detects if the drive is an SSD and runs garbage collection, not defrag.

Bro, check out the page I linked above.

This is the whole point of the thread. W8/8.1 is supposed to detect the SSD and not defrag but there is a bug where after a short period of time the OS begins to Defragment the SSD in addition to optimizing it (Trim).

OP brought it to my attention and after researching it appears to be a wide-spread/well-known issue that MS has not addressed yet.
 
Bro, check out the page I linked above.

This is the whole point of the thread. W8/8.1 is supposed to detect the SSD and not defrag but there is a bug where after a short period of time the OS begins to Defragment the SSD in addition to optimizing it (Trim).

OP brought it to my attention and after researching it appears to be a wide-spread/well-known issue that MS has not addressed yet.

Yep, it happens if your SSD is more than 10% fragmented.

Most people's SSDs are maybe 1% fragmented.
 
"Oh no! The sky is falling! My SSD was just defragmented! The horror!"
 
the culprit seems to be with the argument -$ in the event "ScheduledDefrag".
"<Arguments>-c -h -o -$</Arguments>" removing the $ argument allows windows to just send TRIM commands. Run taskschd.msc and go to microsoft/windows/defrag and you will find the ScheduluedDefrag task. Right click it and export to desktop. Remove the -$ from the exported xml
<Exec>
<Command>%windir%\system32\defrag.exe</Command>
<Arguments>-c -h -o</Arguments>
</Exec>
I deleted the original ScheduledDefrag task and imported the new xml and renamed it ScheduluedDefrag so it would run on the same schedule as the original task did. My logs are looking alot better. Defrag only for HDDS, Trim only for SSDs.
 
This is a problem for anyone with an SSD updating from Windows 8 to 8.1. Your Prefetch, Superfetch and ReadyBoot parameters will be changed to incorrect settings during the update.

Windows Experience Index runs automatically on a clean installation of 8.1, but not on an update installation. This is necessary for setting the parameters correctly.

Microsoft unwisely chose to eliminate Windows Experience Index from the 8.1 version. But it is still available from a command prompt.

Open a command prompt
type in "Winsat formal -v" and hit enter
after it finishes, reboot 3 times. After that, your parameters will be set correctly for an SSD.

Thanks to Praz from the OCZ Forum for figuring this out.

http://answers.microsoft.com/en-us/...1-update/ce8b2524-bd3b-43d1-a5c2-7d6d2e20a3e7
 
Back
Top