Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 18, 2013, 03:00:30 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: SetBeginOfZone Absolute PERCENTAGE  (Read 5990 times)
ToolmakerSteve
JkDefrag Hero
*****
Posts: 53


View Profile
« on: April 16, 2009, 02:43:50 am »

Consider this scenario:

I don't want the MFT reserved space to occupy the prime area of the disk -- I'd like to move it out a ways, and put other valuable stuff before it.

For this to work well, I need to pin MFT to an absolute location on a disk. (Which reserved space will automatically follow I presume.)

However, it is less than ideal to specify that absolute location in megabytes. Because then my script has to be re-calculated for each disk size.

So I'd like to say something like: SetBeginOfZone(AbsolutePercent(20))
this would place it 20% of the way into the disk.
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #1 on: April 16, 2009, 02:18:18 pm »

See the PlusPercentageOfDisk parameter for SetBeginOfZone().
Logged
ToolmakerSteve
JkDefrag Hero
*****
Posts: 53


View Profile
« Reply #2 on: April 16, 2009, 06:15:55 pm »

See the PlusPercentageOfDisk parameter for SetBeginOfZone().

Thanks, but it needs to be ABSOLUTE not PLUS for the scenario I have in mind. I don't want the MFT to move.

I am referring to an absolute position on the drive, but expressing it as a percentage of the drive size.
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #3 on: April 17, 2009, 07:40:12 am »

I am referring to an absolute position on the drive, but expressing it as a percentage of the drive size.
Ah, I see. Yes, that's already on the wishlist for future implementation.
Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #4 on: April 26, 2009, 02:00:01 am »

 The folders can be placed in a position relative to the 2 big MFT zones ?
 Something like Directory(yes)(before/between/after MFT) ?

 In my opinion, optimal folder position is different for fat and ntfs.
 For fat, they must be to the begin of drive, as close as possible to the root clusters(the most accessed).
 For ntfs the folders can stay between MFT zones(the most accessed).
Logged
poutnik
JkDefrag Hero
*****
Posts: 1105


View Profile
« Reply #5 on: April 26, 2009, 08:47:04 am »

In my opinion, optimal folder position is different for fat and ntfs.
 For fat, they must be to the begin of drive, as close as possible to the root clusters(the most accessed).

Furthermore, FAT in FATxx has fixed position near start, not being a file.

Logged

It can be fast, good or easy. You can pick just 2 of them....
Treating Spacehog zone by the same effort as Boot zone is like cleaning a garden by the same effort as a living room.
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #6 on: April 26, 2009, 11:02:44 am »

The folders can be placed in a position relative to the 2 big MFT zones ?
Yes, although not exactly like that. See the scripts that are included with MyDefrag. They define a zone for the MFT and immediately after that a zone for the directories.

Quote
In my opinion, optimal folder position is different for fat and ntfs. For fat, they must be to the begin of drive, as close as possible to the root clusters(the most accessed).
I agree, but the Windows defragmentation API (and therefore MyDefrag) refuses to move directories on FAT32 filesystems. This is a known limitation of the Windows defragmentation API.

Quote
For ntfs the folders can stay between MFT zones(the most accessed).
I'm not sure if I understand what you mean. The MyDefrag scripts have only a single zone for the MFT.
Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #7 on: April 26, 2009, 11:03:31 am »

poutnik,
 Exactly!
 That's why folder placement should be different for fat-ntfs when grouping all folders toggether in script.
 The same script can group folders together on all drives, but act different by partition type. Mydefrag must make the decision at runtime.
« Last Edit: April 26, 2009, 11:11:03 am by teddy » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #8 on: April 26, 2009, 11:16:49 am »

That's why folder placement should be different for fat-ntfs when grouping all folders toggether in script.
Perhaps you did not understand what I said about the Windows defragmentation API limitation. Let me try again, in as simple words as I can think of: MyDefrag CANNOT MOVE DIRECTORIES on FAT disks.
Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #9 on: April 26, 2009, 11:50:20 am »

-ReclaimMFTzone()
-FileSelect   FileName("$mft") FileActions SortByName(Ascending) FileEnd
-SetBeginOfZone(RoundUpToMegabytes(25))
-FileSelect Directory(yes)
 This put MFT zones to the begining and folders to MFT+25Mib ?
 Or keep MFT's position and after 25MiB put the folders ?
 On my testDrive, MFT is in 2 blocks, at 30% and 50% of drive.
 After reclaim MFT, Mydefrag vacates the begin of drive and fastfill with folders, leaving a gap of 25MiB at the begining of drive. So the folders are in front+25Mib and MFT at 30&50%. After the folders, a very big gap follows, then data and MFT.
 Then, after optimize MFT, it starts from zero?
Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #10 on: April 26, 2009, 11:52:03 am »

That's why folder placement should be different for fat-ntfs when grouping all folders toggether in script.
Perhaps you did not understand what I said about the Windows defragmentation API limitation. Let me try again, in as simple words as I can think of: MyDefrag CANNOT MOVE DIRECTORIES on FAT disks.

Perhaps I am the person working to unlock the API limitations to help the community ? ! ? !

 Remember me ?

 And my posts ?
________
 BTW, I was talking about diffrent strategies for fat/ntfs Mydefrag must decide at runtime by drivetype.
 For ntfs to be moved closer/between MFT's.
 For fat, at least to avoid gaps vacated until me or other person unlocks the API.
« Last Edit: April 26, 2009, 02:48:48 pm by TeDDy » Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #11 on: April 26, 2009, 12:01:08 pm »

And, YES !
FastUpdate and FastOptimize scripts leave 2 gaps at the begin of my ntfs drives.
1. about 25MiB before the folders
2. hundreds of MiB between folders and rest of data.

The scripts are untouched, as you designed them !

P.S.:
 Spacehog zone  instead to be the last one, are placed between MFT zones on drives 70-90% full !
« Last Edit: April 26, 2009, 01:59:53 pm by teddy » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #12 on: April 26, 2009, 08:12:27 pm »

This put MFT zones to the begining and folders to MFT+25Mib ?
 Or keep MFT's position and after 25MiB put the folders ?
The beginning of the directories will be at a multiple of 25 megabytes. The gap between the MFT and the directories is not always 25 megabytes, but varies between zero and 25 megabytes.

Perhaps your MFT is very small. Try zooming in by left-clicking with the mouse, and scrolling all the way down. There must be a file called "$Boot" at the very beginning of the drive (LCN=0), followed by the $MFT at LCN=2.

Quote
On my testDrive, MFT is in 2 blocks, at 30% and 50% of drive.
Perhaps you are talking about the MFT reserved areas? They are not a zone, and not the same as the MFT. They are areas on disk that Windows reserves for expansion of the MFT. MyDefrag cannot move these areas.

Quote
Perhaps I am the person working to unlock the API limitations to help the community ? ! ? !
I am sorry, but there are many people on the forum. So you know that directories are not movable on FAT. In that case I do not understand why you keep repeating that "folder placement should be different for fat-ntfs". There is no folder placement on FAT, so it's totally useless to ask (and repeat asking) for that.

Quote
2. hundreds of MiB between folders and rest of data.
The second gap is a maximum of 1 percent of the size of the disk. I have put it there so that Windows has some room to put temporary files. If you don't like the gap then feel free to change the script.
Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #13 on: April 26, 2009, 11:20:53 pm »

Runned original FastOptimize script on a real drive this time(not the testdrive). It's a storage ntfs drive(non windows)
Runned 5 times on the same drive, after each run I deleted dat, log and debug to not interfere.
Now the LCN's:
0 - 1: F:\$Boot
2 - 6.401: Empty space
6.402 - 32.338: Folders
32.339 - 1.556.937: Empty space
1.556.938 - 17.229.327: files, (actually zone6-spacehogs?)
17.229.327 - 17.229.330: MFT reserved        (a)
17.229.331 - 17.921.816: F:\$MFT               (a)
17.921.817 - 18.211.807: MFT reserved (2)    (a)
18.211.808 - 25.848.985: files
25.848.986 - 25.967.533: F:\$Logfile + $Bitmap   (b)
25.967.534 - 26.571.476: MFT reserved (3)         (b)
26.571.477 - 51.896.226: files, free space, end of drive.

 Perhaps the % are not exacts in my previous post.
 As you can see,
Quote
followed by the $MFT at LCN=2
doesn't happened on 2 test drives + a real one.
 I get $boot, freespace, folders, bigfreespace, files, $MFT as I mentioned.
 I don' have a windows ntfs active partition to test the script

 The a & b are the 2 zones mentioned previously as MFT
 So for ntfs, if selected for fastfill, folders must be placed close to the most accessed zone (a, b) or between them.
 Before analize, the user can't know the LCN of the zone because drives are different sized and MFT's placed differently.
 Even knowing the position(analize, stop, calculate manually) I can't specify where the folders go because of MyDefrag limitations in zone placement.
 I must place them after optimizing a zone, guessing/praing they are close to MFT. As you can see, my MFT zones are in the middle of a zone, making placement impossible.

Quote
Perhaps you did not understand what I said about the Windows defragmentation API limitation. Let me try again, in as simple words as I can think of: MyDefrag CANNOT MOVE DIRECTORIES on FAT disks.
As I've mentioned at
http://www.kessels.com/forum/index.php?topic=1688.0
I am working on this.
I am advancing, slowly to reconstruct the API from assembly. Trust me, it is hard to dissect and trace the kernel32 and fat drivers. A lot of dependency's must be solved. All this in assembler.

 Thank you for your confidence and encouragement .?!
 I feel like a fisherman in Sahara.

 The folders WILL be moved on fat32 so please, don't shoot me for repetitions.
 I try to prepare MyDefrag to handle them optimal when they can be moved, hope ASAP.

 I try to avoid to waste my time to get in some closed position like:
 -Yes, folders can be moved, but their placement can't be precised by scripting.
 -Thank you for the code but I don't use it in MyDefrag because I have other priorities or plans.
 -Nobody uses fat32 anymore and it is hard to modify MyDefrag.......
 -Appreciate this but.... why not build your own program to do.....

« Last Edit: April 27, 2009, 07:30:33 pm by TeDDy » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #14 on: April 27, 2009, 01:42:27 am »

As you can see, followed by the $MFT at LCN=2 doesn't happened on 2 test drives + a real one.
I guess I got confused by your earlier postings, I do not always understand what you write. Could you please run the script with the "-d 5" commandline parameter and post the debug logfile here on the forum? Only up until the program starts placing the directories.
Logged
Pages: [1] 2 3
  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!