Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 20, 2013, 12:47:17 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Defragmenting speedup possibility  (Read 2019 times)
TheKat
JkDefrag Supporter
***
Posts: 14


View Profile
« on: April 14, 2008, 04:43:25 pm »

This weekend I noticed a behaviour of JkDefrag which, if a simple algorithm were added to JkDefrag could, in a few cases, result in substantial speed increases.

I was doing a defrag and in Phase 2, JkDefrag was moving parts of a large file up "above" the busy area of the SpaceHogs. This was an external volume and above the spacehogs everything was clear (no files, nothing unmovable, clear and free space).

I stopped the defrag before it finished, and restarted it. JkDefrag instantly zoomed in on the same "large file" it was working on before I stopped it. Then it did something I did not expect.

Instead of "continuing" to defrag the file from where it left off (i.e.: Appending the rest of the data that was still fragmented), it started moving the whole file again up above the part it had already completed.

A simple example, the nubmers are the block numbers of the file, x's are other intermediate files, s will be free space:

After stopping JKDefrag, it looked like this:

7xxx8xx9xxx0123456ssssssssss

When restarting JkDefrag, it did this:
7xxx8xx9xxxsss3456012sssssss

Then
7xxx8xx9xxxsssssss0123456sss

And finally
sxxxsxxsxxxsssssss0123456789

A simple thought to possibly gain more speed in certain cases: Check to see if "Free Space" after the current end of a fragment is large enough for the other fragments to fit into, and if so, continue filling from that point instead of re-moving the whole file.

Of course, the idea is easy, but maybe something with the Windows API prevents it Smiley
« Last Edit: April 15, 2008, 03:20:41 am by TheKat » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #1 on: April 15, 2008, 02:22:06 pm »

Check to see if "Free Space" after the current end of a fragment is large enough for the other fragments to fit into, and if so, continue filling from that point instead of re-moving the whole file.
Thanks for sharing your idea, I appreciate it! Yes, it's possible. There is some overhead involved in checking if there is enough space behind a file, so the check should also be used for large files. Also, if a file is moved in fragments and the fragments are aligned, then the defragmentation API will not join up the fragments. The file will be fragmented, but there is no speed penalty. Most defragmenters do not show such files as fragmented.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!