Stop Windows XP And Vista Disk Thrashing

There's many causes of disk thrashing on Windows XP and Vista, the most likely being insuffient memory. But if you find the thrashing starts when you leave you computer idle for a while, or when the screensaver comes on, it's likely to be the windows search indexing service or XP auto-defragmentation of the hard disk.

Indexing Service

The Indexing Service is used to speed up Windows Search. If you don't use that, or rarely use it, you can disable it. Searching with Windows Search will still work, albeit more slowly.

  • Open My Computer. Right-click on your hard drive, and select Properties. Un-tick Allow Indexing Service to index this drive for fast file searching. This might take a good few minutes depending on the number of files on your hard disk. Repeat for each hard disk.
  • Under XP, go to Start, Run, then type services.msc. (Alternatively, under Vista, go to Windows Start button and type services). Press Enter. Under XP, find Indexing Service in the list of services, then double-click it. (Alternatively, this is the Windows Search service under Windows Vista). Stop the service and set its Startup Type to "Disabled".

XP Auto-Defragmentation

However, even after disabling the indexing service I still found Windows XP thrashing away when left alone for a while after the screensaver came on. After a little investigation using Sysinternals (which you can download from the Microsoft site), I found that the thrashing was caused by dfrgfat.exe, which is Windows defragmenting the hard disk. I didn't want this happening every time I left the computer for five minutes, wasting the laptop battery and wearing out the hard disk so I disabled that too using the following method. I believe dfrgntfs.exe is the version you would see if you use NTFS instead of FAT32. (I use FAT32 for better compatibility with other Linux partitions).

This is for Windows XP only.
  • Download Tweak UI from the Microsoft site, which is part of the PowerToys suite.
  • Run Tweak UI and go to General, and un-tick Optimise Hard Disk When Idle.

That should stop the XP auto-defragmentation process from running by itself. You can uninstall Tweak UI afterwards, the setting will still remain. You can stop this process without causing any problems, just remember to occasionally defragment your hard disk to keep it working quickly.

Vista Scheduled Defrag

You can turn off the scheduled defragging in Windows Vista, by right-clicking on your hard drive in "Computer". Select Tools, Defragment Now, give permission if asked, then untick Run on schedule.

Page Updated 03/08/09