adding files to a vhd which is nearly full and defrag

Dec 3, 2009 at 12:03 PM

Hey,

when I add some files to a vhd which is nearly full (Partition is 25 GB and e.g. used 24GB), the discutils start to defragment the vhd, for afai can see every file I add.
This takes ages when the disk is full ....

Can I do something so e.g.
- defrag is done just once at the end of adding the files
- defrag isn't done at all
- use another format, currently it's dynamic

Any hints?

Ciao Ephraim

Coordinator
Dec 6, 2009 at 11:39 AM

Hi Ephraim,

This is a limitation in the NTFS implementation right now.  The big problem is there's no code to support writing to highly fragmented files, or files with lots of NTFS attribute data.  In these cases, the file needs to occupy multiple Master File Table records - right now, if that situation occurs a primitive copy ('defrag') is done to try to squeeze the file back into a single MFT record.  As disks get full, the likelihood of all this happening increases greatly.

It's horribly inefficient the way it's implemented right now.

I'll change this thread into a work item.

Cheers,

Ken

Coordinator
Dec 6, 2009 at 11:41 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.