Windows 8 and 8.1 Forums

Defrag on SSD

  1. #21


    Posts : 480
    Windows 8 Pro x64


    Hi Jimbo,

    We can't see what hardware is doing, but it's enough to know what it's doing. It doesn't look like you've provided any explanation, so let me fill in the blanks.

    On SSDs, Windows uses LBAs, exactly the same way as with HDDs. So there are in fact classical sectors, if this is what you're referring to. The difference is that on SSDs LBAs are logically mapped to physical NAND cells. That's the hardware design.

    The software design is to send TRIM commands when a file is deleted, so the SSD controller can take care of it during its maintenance procedures, and not when OS tells it to write in this LBA, like happens on HDDs. This would cause performance degradation, so it's a clever system!

    The controller doesn't care about fragmented file system, all it cares is NAND fragmentation, and it takes care of it with Garbage Collection / NAND defrag.

    Now, imagine, you're the controller who just perfectly defragged NAND, everything is neat and clean. Then, all of a sudden, the OS performs the file system defrag that results in moving fragments and writing them to disk. Too bad, you've got to defrag NAND again, because it's not perfect anymore.

    SSD controllers are indeed intelligent and they won't get mad at you for making them clean their house twice But I'd really prefer to stick the discussion to the software side of things, because this is what matters here.

    Vadim

      My System SpecsSystem Spec

  2. #22


    Posts : 22,582
    64-bit Windows 10


    Quote Originally Posted by Vadikan View Post
    Shawn,

    What you're saying is correct... in theory

    1. I've researched this issue long enough to be certain that the bug exists and reproduces on all Windows 8 machines with default defrag and maintenance settings.

    2. My blog readers provided me with enough data to support this point, and modern SSDs are affected as well. I've got a lot of logs posted by my readers from different machines. Feel free to dig thru them, looking for Windows 8 PCs and finding proof (SSD models are easy to figure out from the logs).

    3. Please read my blog post carefully to see how the issue occurs (the commands you've posted are irrelevant to the issue). Then check the logged events on all machines available to you. The OS has to be installed for at least a month for the defrag to occur with reasonable probability and be reflected in the event log. But I assure you it will occur sooner or later

    I can see if I can translate my CheckBootSpeed utility to English, so we can get more logs from EF readers. Or I can throw a quick PS script. But 8.1 Preview is too recent, so the logs are not likely to show the issue. But that doesn't mean the issue will not occur.


    brummyfan,
    The service start type is manual, so it starts only for defrag/optimization.
    I see what you mean now. I added a warning at the top of the tutorial below to help spread the word.


    Optimize Drives Schedule - Change in Windows 8
      My System SpecsSystem Spec

  3. #23


    Posts : 480
    Windows 8 Pro x64


    Hi Shawn,

    Have you found the issue on your systems?

    Thanks for adding the warning! Spreading the word is important, but not as important as fixing the bug... Unfortunately, the Top Community Issue program you may be aware of has been abandoned long time ago and recently discontinued on MS Connnect, so the bug report fell on death ears.

    Vadim
      My System SpecsSystem Spec

  4. #24


    Posts : 22,582
    64-bit Windows 10


    I haven't seen it on my system, but I'll bump up the schedule and monitor it more.

    Only the C: drive is a SSD.

    Code:
    The system booted in 54 seconds, including the user profile in 1 seconds
    The average of the last three boots is 39 seconds
    
    It took 28 seconds to fully load the Desktop,,
    which could be affected by 9 programs in startup.
    
    The 'SuperFetch' service startup type is Auto, and it is currently Running
    
    The 'Task Scheduler' service startup type is Auto and it is currently Running
    The 'Disk Defragmenter' service startup type is Manual
    
    The scheduled disk optimization task is on
    The last disk defragmentation was on 08/05/2013 00:42:16
    The system drive C: has a size of 237.96 GB with 61.05% of free space
    
    This PC is running Microsoft Windows 8.1 Enterprise Preview 6.3.9431 64-bit
    Processor Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
    Installed memory (RAM): 32717 MB
    Windows installation date: 2013-07-30 (installed for 5 days)
    The system is probably installed on SSD (random read speed is 380.66000 MB/s)
    
    
    #########################################
    Additional diagnostics data
    #########################################
    
    Disk and partition info (Windows 8 only)
    \\?\Volume{8eaf3625-1bf4-4590-880d-25b6914bee7a}\
    \\?\scsi#disk&ven_ocz-vect&prod_ocz-vector#4&4905d17&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
    
    \\?\scsi#disk&ven_ocz-vect&prod_ocz-vector#4&4905d17&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
    
    \\?\scsi#disk&ven_ocz-vect&prod_ocz-vector#4&4905d17&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
    
    C:\
    \\?\Volume{77c9053c-9bd5-45b1-a061-9d3b79bd27f0}\
    \\?\scsi#disk&ven_ocz-vect&prod_ocz-vector#4&4905d17&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
    
    \\?\scsi#disk&ven_samsung&prod_hd154ui#4&4905d17&0&010000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
    
    D:\
    \\?\Volume{8dd61c54-a5f0-406f-a2ca-b65175e2f337}\
    \\?\scsi#disk&ven_samsung&prod_hd154ui#4&4905d17&0&010000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
    
    \\?\scsi#disk&ven_samsung&prod_hd154ui#4&4905d17&0&040000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
    
    E:\
    \\?\Volume{3631da9d-ef79-478b-b5a7-b5ab75b614d0}\
    \\?\scsi#disk&ven_samsung&prod_hd154ui#4&4905d17&0&040000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
    
    
    
    #########################################
    Recent disk assesment
    
    
    8.15
    
    kind            units ioSize score #text    
    ----            ----- ------ ----- -----    
    Sequential Read MB/s  65536  8.1   506.64500
    Random Read     MB/s  16384  8.2   380.66000
    
    
    #########################################
    Prefetch, SuperFetch  Readyboot
    
    
    EnablePrefetcher: 3
    EnableSuperFetch: 3
    
    
    Latest ReadyBoot actions:
    Latest Prefetcher actions:
    
    LastWriteTime                            Extension                              
    -------------                            ---------                              
    8/5/2013 1:24:46 AM                      .pf                                    
    8/5/2013 1:24:39 AM                      .pf                                    
    8/5/2013 1:24:34 AM                      .pf                                    
    
    
    #########################################
    Defrag scheduled task parameters
    \\?\Volume{8dd61c54-a5f0-406f-a2ca-b65175e2f337}\ \\?\Volume{3631da9d-ef79-478b-b5a7-b5ab75b614d0}\ \\?\Volume{8eaf3625-1bf4-4590-880d-25b6914bee7a}\ -h -o -$
    
    
    #########################################
    Event log
    
    
    TimeGenerated : 8/5/2013 12:42:16 AM
    Message       : The storage optimizer successfully completed defragmentation on 
                    Data (E:)
    
    TimeGenerated : 8/5/2013 12:42:14 AM
    Message       : The storage optimizer successfully completed defragmentation on 
                    Backups (D:)
    
    TimeGenerated : 8/5/2013 12:38:10 AM
    Message       : The storage optimizer successfully completed defragmentation on 
                    Data (E:)
    
    TimeGenerated : 8/5/2013 12:36:40 AM
    Message       : The storage optimizer successfully completed defragmentation on 
                    Backups (D:)
    
    TimeGenerated : 8/5/2013 12:14:48 AM
    Message       : The storage optimizer successfully completed analysis on 
                    Backups (D:)
    
    TimeGenerated : 8/4/2013 6:14:10 AM
    Message       : The storage optimizer successfully completed retrim on (C:)
    
    TimeGenerated : 8/4/2013 6:12:05 AM
    Message       : The storage optimizer successfully completed retrim on (C:)
    
    TimeGenerated : 8/3/2013 10:54:04 AM
    Message       : The storage optimizer successfully completed retrim on (C:)
    
    TimeGenerated : 8/3/2013 10:53:55 AM
    Message       : The storage optimizer successfully completed retrim on Recovery
    
    
    
    Report creation date: 8/5/2013 1:24 AM
    Last edited by Brink; 05 Aug 2013 at 01:28. Reason: added log
      My System SpecsSystem Spec

  5. #25


    Orbiting the Moon
    Posts : 2,975
    Windows 10 x64


    Quote Originally Posted by Vadikan View Post
    Windows 8 erroneously defrags SSDs, indeed. Doesn't look like it's been fixed in Windows 8.1.

    My blog's got only one article in English, but it's about this issue
    Why Windows 8 defragments your SSD and how you can avoid this
    Disabling automatic optimization:
    You may need to uncheck the Recovery partition as well if it's part of the SSD (C: drive) installation of Windows.

    Click image for larger version

    For example, I got one SSD here, the recovery partition is 300MB and makes part of the installed Win8 system on C: drive.
      My System SpecsSystem Spec

  6. #26


    Posts : 480
    Windows 8 Pro x64


    Shawn,
    Thanks for adding the log. Vector is pretty fast, huh? :)

    A few observations from your log:
    1. The OS has been installed for just 5 days, so it's too early for the maintenance defrag to kick in.

    2. Your ScheduledDefrag parameters are different from the default (-c -h -o -$). If you want to reproduce the bug, it's better to check all volumes in dfrgui.

    3. [irrelevant to the defrag issue] Strangely, EnableSuperFetch is equal to 3 and ReadyBoot is working (*.pf files). This may change after you run system assessment (WEI). Have you done that? Unlike in Windows 7, it's been removed from the Windows 8 setup process.

    4. [irrelevant as well] 39 seconds to boot on average is pretty low for such a powerful system, unless driver/update installations were involved in reboots.

    Hopachi,
    It's a good point, and I had the same comment from my blog reader. Yet I deliberately have not included Recovery / System Reserved partitions in my instructions :) There's no activity on them, so there's no reason for them to become fragmented. Also, the partitions are small, so any negative impact from defrag is not worth it.

    The bottom line is I didn't want to complicate the instructions, leaving it up to advanced users to figure out :) But yes, I've seen System Reserved partitions defragged and more than once (e.g. here it happens every month). I have no idea why :)

    Vadim
      My System SpecsSystem Spec

  7. #27


    BELGIUM
    Posts : 503
    WINDOWS 8.1 x64


    hi guys,

    first of all i will write this down Shawn, or better use it on my other computers weekly, those supporting TRIM.

    Myself i use Intel Rapid Storage Technology on my Raid0, but i think everyone can use this via download (Intel) or like me having this option thanks to my Asus O8Z77-V, where this software is included.

    Jeff
      My System SpecsSystem Spec

  8. #28


    BELGIUM
    Posts : 503
    WINDOWS 8.1 x64


    hi again,

    just shaw that the last defrag on my external HDD ran on august 2d, for the C and S 16 days ago, so maybe not defragged, but my ENYO (external SSD via USB from OCZ) gives the same result as for the external HDD.

    So in my opinion Windows does not recognize an external SSD as en SSD and defrags it. Nice.....


    Jeff
      My System SpecsSystem Spec

  9. #29


    Posts : 480
    Windows 8 Pro x64


    Hi Jeff,

    There are lots of maybes in your post Just use CheckBootSpeed 2.0 EN (Beta) and post the results so we can evaluate them.

    Vadim
      My System SpecsSystem Spec

  10. #30


    BELGIUM
    Posts : 503
    WINDOWS 8.1 x64


    ok Vadikan,

    just ran the program which proofs that the ENYO is threated as a HDD.

    But not the C: drive.

    Unless i read wrong.

    thanks

    Jeff notepad-defrag.txt
      My System SpecsSystem Spec

Page 3 of 5 FirstFirst 12345 LastLast
Defrag on SSD
Related Threads
SSD & Defrag in Drivers & Hardware
On the subject of SSD disks, and hybrid disks (mine) I saw some posts quite a while back about defragging such disks. As a result of the acute uncertainty back then, I have never defragged my C drive hybrid. (I also have 2 x SATA drives which I do defrag monthly.) Can anybody update me, and...
Defraggler needs to defrag twice? in Performance & Maintenance
Hello everyone, So another forum I am a member of said that Microsoft default maintenance tools like "disk cleanup" and "defrag" don't do the job very well and they were recommending "ccleaner" and "defraggler" I have already been using ccleaner to scan for registry issues but when I use...
why my w8.1 pro want to defrag my ssd? in Performance & Maintenance
Hi why my w8.1 pro want to defrag my ssd? the defrag tool display needs optimation, even my System Reserved :huh::huh: thanks i did check and trim is enabled
Solved Defrag not working in Performance & Maintenance
So I tried to open defrag today for the first time with using Windows 8 and when I click on the application the command prompt opens and closes in about two seconds and then nothing happens. Any ideas on how to fix this issue.
Solved optimize defrag in Performance & Maintenance
I notice I have the C: in the desktop and have reserved besides the C: in the laptop. Does this mean that when I try to recover an image to the desktop containing only the C; I won't be able to? I only have one partition or drive in each.
Defrag and SSD in Performance & Maintenance
Hello Guys, For those of you with a SSD boot drive do you leave defrag switched on or do you disable it. I have a Samsung 840pro and the documentation that came with the drive says that Defrag has to be disabled via their Magician software but on various posts around the internet some people are...
Solved Disk Defrag in W8 in General Support
Should I turn off disk defragment in Windows8 for ssd?
Eight Forums Android App Eight Forums IOS App Follow us on Facebook