Does Win10 *Automatically* Defrag At Certain Times

Discussion in 'Windows 10' started by DeathStalker77, Jul 21, 2020.

  1. DeathStalker77

    DeathStalker77 MDL Addicted

    Nov 8, 2009
    552
    40
    30
    I have ONE drive (USB) that consistently raises in temp at various times. I have a separate defrag program and it specifically EXCLUDES all USB drives - and I explicitly excluded it as well. Only the one seems to do this.

    Any ideas?
     
  2. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,341
    7,060
    210
    Windows will regularly defrag all disks seen as internal (not removable). Method is different for normal disks vs. SSD.

    But there are also other activities that can raise a drive's temperature while being seemingly idle:
    - Automatic garbage collection, e. g. TRIM command for SSD and SMR-HDD
    - Automatic SMART surface check during idle (called Offline test)
    - Idle virus check by the A/V
    - Check for temporary/trash files by Storage sense or cleanmgr
     
  3. DeathStalker77

    DeathStalker77 MDL Addicted

    Nov 8, 2009
    552
    40
    30
    Is there a way to disable this functionality?

    Thanks!
     
  4. MELERIX

    MELERIX MDL Expert

    Nov 7, 2011
    1,217
    653
    60
    USB drives that are not HDD are automatically excluded from defrag, like SSD or Pendrive, so you don't have to do anything special.
     
  5. ruuu7

    ruuu7 MDL Member

    Mar 7, 2015
    229
    49
    10
    ...and I think that is wonderful!
     
  6. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,341
    7,060
    210
  7. monkeylove

    monkeylove MDL Member

    Dec 8, 2013
    108
    25
    10
    You probably don't need this if you have an SSD. However, if you have that and many regular drives and sometimes experience a slowdown which disappears when you do a manual defrag, then this might help.

    Run Task Scheduler, then go to the Microsoft - Windows - Defrag folder. You'll see a ScheduledDefrag entry if you set a schedule in the Defrag program.

    The problem is that defrag will usually run if there's nothing else running. If you have some software that does, then it will think that the system isn't busy and thus will not defrag.

    To fix that, create a new task in the same folder and copy the settings of the one made by Windows, making sure that you have the ff. in each tab setting:

    General - change the user to system, check "run with the highest privileges", and configure for Windows 10

    Triggers - set the schedule that you want

    Actions - run the program

    %windir%\system32\defrag.exe

    with the ff. arguments:

    -c -h -o -$

    Conditions - uncheck everything except for power if you're using a laptop

    The system will defrag one disk at a time during the schedule given. Any SSDs will only be trimmed.

    You can right-click and run the task to see if it works. Run the defrag program and you'll see that it is defragmenting one drive at a time.

    You can also right-click and disable the task if you wish.