- Defragmentation trigger criteria
A practical trigger should not require all conditions to be true. The supported guidance is:
- Keep free disk space at 20% to 25% of total disk space to avoid negative disk I/O impact.
- Run defragmentation regularly, and on busy disks weekly.
- Fragmentation matters because noncontiguous clusters increase HDD head movement and slow reads and writes.
For an operational policy on HDDs, the supported approach is:
- Run analysis first:
defrag <volume> /a /u - Run defrag when analysis shows meaningful fragmentation, especially on busy HDD volumes.
- Treat free space below 20% to 25% as an additional trigger, because low free space itself negatively affects disk I/O and also makes defragmentation less effective.
The context does not provide an official Microsoft rule such as “start when any one condition is met” or “only when all are met,” and it does not provide a supported latency threshold.
- Built-in ScheduledDefrag not running
The supported checks are:
- In Optimize Drives, review the schedule and change it if needed.
- The scheduled defragmentation task typically runs every week.
- The task may not run if:
- the process would need to wake the computer,
- the computer is running on battery power,
- the computer is resumed from being idle.
- For SSDs, changing the scheduled task frequency does not change the once-per-month cadence for traditional defragmentation.
For troubleshooting a Windows Server 2022 system where ScheduledDefrag does not run, collect these supported facts first:
- Confirm the volume is an eligible local volume.
- Confirm the volume is not:
- locked by the file system,
- marked dirty,
- a network drive,
- a CD-ROM,
- a file system other than NTFS, ReFS, FAT, or FAT32.
- If the volume is dirty, run
chkdskbefore defragmenting. The dirty state can be checked withfsutil dirty. - Manually test the volume with:
-
defrag <volume> /a /u -
defrag <volume> /u /v
-
- Check whether the machine was actually idle, powered appropriately, and not blocked by the scheduled-task conditions above.
The context does not provide a supported escalation path for Microsoft engineering to investigate the machine directly, and it does not list the exact Task Scheduler or Event Viewer log set to submit.
- How to confirm fragmentation is causing performance degradation
The supported evidence is correlation by before/after comparison on HDD workloads:
- Fragmentation slows HDD access because file data is stored in noncontiguous clusters, increasing read/write head movement.
- Low free space also negatively affects disk I/O performance.
A supported way to evaluate contribution is:
- Measure the workload symptoms before optimization.
- Run fragmentation analysis:
defrag <volume> /a /u. - Defragment the HDD volume:
defrag <volume> /u /v. - Re-run the same workload under similar conditions.
- Compare:
- fragmentation analysis output before and after,
- observed disk response behavior before and after,
- application/file operation time before and after.
If performance improves after defragmentation under otherwise similar conditions, fragmentation was a contributing factor. The context does not provide a Microsoft-defined formula that proves fragmentation is the sole cause versus CPU, memory, antivirus, database, or storage hardware.
- Event IDs or log messages
The context does not provide specific Event IDs or sample event messages for defragmentation success or failure.
What is supported is using the command output directly:
-
defrag <volume> /ushows progress. -
defrag <volume> /vshows verbose fragmentation statistics. -
defrag <volume> /aperforms analysis only. -
defrag <volume> /ttracks an operation already in progress.
For operational evidence, the most directly supported output is the verbose defrag result and the Last run status in Optimize Drives. Also note that if analysis is skipped, the Last run time in Optimize Drives might not be updated and can appear up to a month old.
- Fragmentation percentage versus performance concern
The context does not provide an official Microsoft fragmentation percentage threshold such as a fixed “concern starts at X%.”
The supported practical guidance is:
- On HDDs, fragmentation degrades performance because noncontiguous clusters increase seek time.
- Keep free space at 20% to 25%.
- Run defragmentation regularly, and weekly on busy disks.
For an operational policy grounded in the available guidance:
- Treat low free space (<20% to 25%) as a performance concern.
- Treat busy HDD volumes as candidates for regular weekly optimization.
- Use
defrag /aanddefrag /vresults to decide whether fragmentation is high enough to justify immediate defragmentation on that workload.
If a single practical rule is needed for HDD operations, the strongest supported policy from the context is:
- Maintain 20% to 25% free space and run scheduled optimization weekly; if a busy HDD shows high fragmentation in
defrag /aoutput or measurable improvement afterdefrag /v, keep that volume on active defragmentation.