Jump to content

Sugg: two-stage defragging


thany

Recommended Posts

We all know that Defraggler can also only defragment fragmented files. Doing only this step is actually very efficient. The actual placement of files that are not fragmented is much less a performance hit. Maybe because of this knowledge, Diskeeper performs a two-stage defrag when doing a regular manual defrag.

 

The first stage is to defragment fragmented files, and place them whereever it's most convenient, i.e. a contiguous piece of free space closest to the largest fragment, or as close to the beginning of the volume, whichever turns out best. The placement of files in relation to each other does not matter at this stage.

 

The second stage is to defragment "free space", i.e. shoving files together so that the beginning of a file always touches the end of another file. No space between files. This is done by taking files from as close to the end of a volume as possible, and placing them as close to the beginning of the volume as possible, of course matching file size against the amount of free space that needs fitting.

 

A possible first-and-a-half stage could be placing files in the order dictated by layout.ini. This ensures the files are layed out in a way the OS thinks is most efficient. Only for XP/Vista/2003/2008.

 

I know Diskeeper has been around for quite some years, and being commercial and all gives them the oppertunities to come up with very efficient algorithms, but all the better: let it be an example :)

 

--

But right now, the two-stage can be simulated by defragging fragmented files manually and then doing a normal defrag. Very efficient, if the regular defrag could be tweaked a little to make it faster, because I've seen it juggling with relatively small files without getting much further.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.