Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
June 20, 2013, 07:23:14 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Zone Start Adjusting  (Read 1110 times)
amk
JkDefrag Hero
*****
Posts: 101



View Profile
« on: November 28, 2009, 12:17:18 pm »

Very frequent situation
Previous zone grow - begin of zone moved towards end of disk - first files of zone moved up to zone end.
Previos zone shrink - begin of zone moved towards begin of disk - files moved to new begin of zone.

I suggest add ability to adjust begin of zone - if nearest to begin of disk selected file starts near of calculated begin of zone move begin of zone to this file begin

Some like
AdjustBeginOfZone(NUMBER, NUMBER), where NUMBERs is maximal offsets of first file about calculated zone begin

It's may decrease defragmentation time.
« Last Edit: November 28, 2009, 12:32:27 pm by amk » Logged
Kasuha
JkDefrag Hero
*****
Posts: 595


View Profile
« Reply #1 on: November 28, 2009, 12:35:02 pm »

Previous versions of MyDefrag used zone begins rounded to whole fractions of disk size. Problem with that was that on very full disks these gaps ate all free space and MyDefrag ran out of room before it managed to optimize the disk. So it was changed to use fractions of free space which in result moves zone starts all the time.

In my opinion, the correct solution is somewhere in the middle - use fixed positions on disks that are not too full and use fractions of free space on full disks. Unfortunately it requires mathematical functions that are not currently available in MyDefrag scripting language.

If your disk is not full too much, you can try to replace expressions in AddGap(...) commands in your scripts with ones that use disk size instead of free space. Personally I am using this:

    AddGap(RoundUp(ZoneEnd + VolumeSize / 200, VolumeSize / 200))
Logged
amk
JkDefrag Hero
*****
Posts: 101



View Profile
« Reply #2 on: November 28, 2009, 12:48:54 pm »

This suggestion for different situation.
For example:
We have two zones described as
Code:
FileSelect # Zone 1 starting at LCN = 0 (for example)
  SomeFiles
FileAction
  SomeActions
  AddGap(RoundUp(ZoneEnd+1024*BytesPerCluster, 1024*BytesPerCluster)
FileEnd
FileSelect  # Zone 2
  OtherFiles
...
1. If zone 1 has size 1024 Clusters zone 2 starts at LCN = 2048
2. If zone 1 grow to 1025 clusters zone 2 moved to LCN = 3072 - 1024 clusters moved for vacating gap
If zone 1 srink back to 1024 clusters - 1024 clusters moves back to LCN = 1024
With this adjusting zone 2 stays at LCN = 3072 and no files moved.

Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7156



View Profile WWW
« Reply #3 on: November 28, 2009, 02:16:51 pm »

I suggest add ability to adjust begin of zone - if nearest to begin of disk selected file starts near of calculated begin of zone move begin of zone to this file begin
Thanks for sharing your idea, I appreciate it. It's already on my wishlist. There is a potential problem, though. In time the zone will move more and more to the end of the disk, it will never move down.
Logged
amk
JkDefrag Hero
*****
Posts: 101



View Profile
« Reply #4 on: November 30, 2009, 05:10:08 pm »

If previous zone significantly shrink, begin of first file found out of adjustment interval. Begin of zone not adjusted and zone moved in direction of disk begin. Also, file must by not fragmented (I think)
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!