Does Win7 automatically defrag drives when idle?

I’ve noticed recently that when my computer is idle, suddenly the drive light turns on and I can hear one of the drives churning like crazy. I’ve opened the task manager to see what tasks were CPU heavy, but as soon as I open the task manager the drive churn stops. I’ve since noticed it happening, and just let the computer stay idle. The drive churn seems to go on for a very long time. Much longer than a pagefile dump it seems.

I thought it might be a virus/trojan, but my system is clean. Is Win 7 defragging the drives? If so, where can I modify this functionality?

Windows 7 does do a scheduled defrag, I don’t know about when idle. I’d guess it’s more likely the search indexer.

Yes, Windows 7 both defrags (or at least checks fragmentation) and indexes while idle. (The defrag runs themselves are scheduled but the Windows scheduler will run the defrag tool at the lowest priority, so only when idle.)

To disable automatic defrags, type “Disk Defragmenter” in the Start Menu and turn of scheduled defragmentation.

I think after 10 idle minutes defrag starts…

I disabled the defrag service.

Vista and 7 also do some SuperFetch maintenance while idle.

I used to get freaked out about sudden, unexpected disk activity since back in ye olde days there wasn’t really any reason for it, so it would seem to indicate something’s wrong or maybe someone’s STEALING MY MEGABYTES!!!, but nowadays there’s a dozen different things that could trigger it.