HDD activity when computer is idle

Situation

I had the same problem in Windows 10: after about 5 minutes of system idle, there was a lot of disk activity on data disks (non swap, just data files), which disappeared on just a single mouse move.

The Task Manager didn't show much. The Resource Monitor did show that svhost was causing the disk activity, but didn't show which sub service of it was causing it.

Process Explorer ( https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx ) does show the sub services. After about 5 minutes of mouse/keyboard idle, defrag.exe started under svchost.

Solution

You can disable it (scheduled defragmentation, the cause) via the Task Scheduler > Task Scheduler Library > Microsoft > Windows > Defrag > then disable the "ScheduledDefrag". Disabling it removed the problem on my system.

Explanation

Defrag is used to defragment the hard disk. For example, a file can be stored in multiple fragment spread over the hard disk. When the file is read, the hard disk head has to physically move to all the fragments sequentially, which requires some time and thus costs some performance. The defrag process moves the fragments to optimal locations, so that the hard disk head has to move less physical distance, which improves hard disk read and write performance.

Windows starts the defrag process automatically using the Task Scheduler when you idle for 5 minutes, but you can also manually start defrag: right click on a drive letter > Properties > Tools > Optimize. The fragmentation percentage indicates whether there is a need to defrag.

SSDs don't need to be defragmented, because there is no physical head movement. Using defrag on a SSD lowers the life expectancy of a SSD.