# xp disk defragmenter / unmovable files



## jeromeofm (Nov 27, 2007)

Just a point of curiosity: what are the "unmovable files" referred to by disk defragmenter, and why do they move around between defragmenting sessions?

I'm running XP / SP2 on a Dell Inspiron 9200.
The disk defragmenter shows blue and red files, and then green files which are "unmovable" and there is an especially large band of green that always appears, but in different places in the last half of the band.
occasionally, disk defragmenter does move small slices of green files, but never the larger bands of green.

thank you for your help.


----------



## justpassingby (Mar 11, 2007)

Files that are in use by the operating system at the time you run the defragmenter can't be moved. The paging file and the MFT (Master File Table) are such files. 

By default, the paging file is dynamic which means it will expand when some apps need more paging space and reduce its size when the space is freed. Obviously it can only expand to some free space on the drive and since files are continuously added and deleted on the drive the first available batch of free space for the paging file is not always at the same place.

When there begins to be lots of files and folders on the drive the MFT can also grow in size and become fragmented. 

I believe that the other system files that are in use at the time you run the defrag can't be moved either. Those files can move with the time since sometimes, when they're not in use, the defragmenter will be able to move them. And I guess that when Windows update updates one of those files or add new system files they can also switch places.

If space is not an issue you can set the paging file to a fixed 1.5GB size and use Perfect Disk (I believe they have a 30 days fully functional evaluation version) to defrag all those files that can't normally be moved, including the paging file, when the computer starts. It's called an offline defragmentation in Perfect Disk. This will prevent the paging file to cause further fragmentation on the drive since it'll be in one contiguous space and won't change size anymore.

To set the paging file to a fixed size, right-click my computer => properties => advanced => settings under performances => advanced => change. Set a custom size of 1500-1500MB.

Note that if you have more than one physical drive in your computer (they have to be different physical drives, not just 2 partitions on the same drive) you can improve its performances if you set the paging file to another drive that the one that holds the operating system. You'll have to keep a small paging file on the drive that holds the Windows files or some applications may complain, 100MB should be enough. Set the remaining (1400MB) on the other drive. Then run an offline defragmentation on all your drives.

You can also defrag the paging file using the regular defragmenter that comes with Windows if you delete the paging file (set its size to 0MB), restart the computer, run defrag and then recreate the paging file : the free space will be in one contiguous space which means the paging file will be as well when it'll be recreated. You need to have at least 256MB of RAM to be able to delete the paging file or Windows will not have enough space in memory to hold the system files it needs. The drawback of this method is that the paging file will be recreated around the end of the drive (after all the other files) and that read/write performances on a hard drive are better at the beginning of the drive (physically the first files on the first partition of a drive are on the outer part of the platter which spins faster than the inner part). If the paging file is used a lot by some applications this can decrease their performances a bit.


----------

