© J.C. Kessels 2009
MyDefrag Forum
May 25, 2013, 12:20:16 am
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
MyDefrag Forum
>
MyDefrag v4 Forum
>
Requests for new features
>
A New FileBoolean: Distance
Pages: [
1
]
« previous
next »
Print
Author
Topic: A New FileBoolean: Distance (Read 2432 times)
Lexar
JkDefrag Hero
Posts: 91
A New FileBoolean: Distance
«
on:
September 24, 2009, 11:40:01 pm »
Distance(drive, 3221225472): selects directories and files that are 3GB or farther away from the beginning of the drive.
Distance(directory, 3221225472): selects direcotries and files that are 3GB or farther away from its parent directory.
Distance(mft, 3221225472): selects directories and files that are 3GB or farther away from the drive's MFT.
Distance(Name("C:\hoge.db"), 3221225472): selects directories and files that are 3GB or farther away from the file "C:\hoge.db".
Logged
jeroen
Administrator
JkDefrag Hero
Posts: 7155
Re: A New FileBoolean: Distance
«
Reply #1 on:
September 25, 2009, 07:30:03 am »
Thanks for sharing your idea, I appreciate it. Could you please explain why this would be useful? My first thought is that you are trying to speed up optimization by only selecting a small subset of files. But MyDefrag does not work like that, you have to select all the files for a zone.
Logged
Lexar
JkDefrag Hero
Posts: 91
Re: A New FileBoolean: Distance
«
Reply #2 on:
September 25, 2009, 02:57:46 pm »
Suppose there are a directory "app" containing an executable "app.exe" and a database hive "app.db" in a 1TB drive. If "app" happens to be at the beginning of the disk, app.exe in the middle, app.db at the end, then the drive head needs to read "app", travel 500GB, read app.exe, travel another 500GB, and finally read app.db.
You could pack them together on the drive if you sorted files by name. However, files are created daily. It is certainly an overkill to sort all the files in a zone every day.
I then hit upon an idea that for a light daily optimization, it should be wise to grab only those files that happened to be unacceptably far up, and move them down.
Logged
quanthero
JkDefrag Hero
Posts: 234
Re: A New FileBoolean: Distance
«
Reply #3 on:
September 25, 2009, 04:41:11 pm »
Quote from: Lexar on September 25, 2009, 02:57:46 pm
Suppose there are a directory "app" containing an executable "app.exe" and a database hive "app.db" in a 1TB drive. If "app" happens to be at the beginning of the disk, app.exe in the middle, app.db at the end, then the drive head needs to read "app", travel 500GB, read app.exe, travel another 500GB, and finally read app.db.
What about using:
Code:
FileSelect
FileName("app.*")
FileActions
Defragment(fast)
FastFill()
FileEnd
This way, all app.* (e.g. app.exe, app.dll, app.db, app.ini, etc.) will be close to each other on the disk.
Logged
Kasuha
JkDefrag Hero
Posts: 595
Re: A New FileBoolean: Distance
«
Reply #4 on:
September 25, 2009, 04:42:10 pm »
After optimization, beginning of your disk will be quite full. After some using, it will become even more full because system will fill empty spaces between zones with new files. If you move something "down" to keep it together, you will have to move something else "up" to make room for it. There's good chance that things you move will become "too spread" now instead of these you optimized.
Another thing is, on modern drives, seek represents a few milliseconds. Also, seek time is highly nonlinear - seek over full cylinder range is much shorter than seek between neighbor cylinders multiplied by number of cylinders - track-to-track seek is usually somewhere about 1 ms while full range seek is usually about 20 ms (0.02 s). If it is only about a few new files time to time I think there's nothing to worry about.
There's no reason to be too paranoid about having the disk "clean". Main task is to have
most
of frequently used files together at beginning of the disk and
most
of the rest defragmented. And that's what standard MyDefrag scripts take care about.
Logged
Lexar
JkDefrag Hero
Posts: 91
Re: A New FileBoolean: Distance
«
Reply #5 on:
September 26, 2009, 01:04:36 am »
Quote from: quanthero on September 25, 2009, 04:41:11 pm
What about using:
Code:
FileSelect
FileName("app.*")
FileActions
Defragment(fast)
FastFill()
FileEnd
This way, all app.* (e.g. app.exe, app.dll, app.db, app.ini, etc.) will be close to each other on the disk.
For one directory it does work, but if there are thousands of them, you will need a better solution.
Also, I should point it out that FastFill() moves directories and files that are already close enough together.
Logged
Lexar
JkDefrag Hero
Posts: 91
Re: A New FileBoolean: Distance
«
Reply #6 on:
September 26, 2009, 01:08:48 am »
Quote from: Kasuha on September 25, 2009, 04:42:10 pm
There's no reason to be too paranoid about having the disk "clean". Main task is to have
most
of frequently used files together at beginning of the disk and
most
of the rest defragmented.
That's exactly what I am pointing out. And to pack frequently used files together, I need Distance() to select them. With Distance(), you could select files that are listed on Layout.ini and far apart.
Logged
rjs_boy
JkDefrag Supporter
Posts: 11
Re: A New FileBoolean: Distance
«
Reply #7 on:
September 26, 2009, 06:12:52 am »
Quote from: Lexar on September 26, 2009, 01:08:48 am
With Distance(), you could select files that are listed on Layout.ini and far apart.
Code:
FileSelect
ImportListFromBootOptimize()
FileActions
<Insert Sort Action Here>
FileEnd
Wallah!
Puts everything in the Layout.ini into the same area on the disk.
«
Last Edit: September 26, 2009, 06:14:27 am by rjs_boy
»
Logged
jeroen
Administrator
JkDefrag Hero
Posts: 7155
Re: A New FileBoolean: Distance
«
Reply #8 on:
September 26, 2009, 10:16:32 am »
Quote from: Lexar on September 25, 2009, 02:57:46 pm
I then hit upon an idea that for a light daily optimization, it should be wise to grab only those files that happened to be unacceptably far up, and move them down.
Thanks for the explanation, that's what I thought. As I said before MyDefrag does not work like that. MyDefrag creates zones that ONLY contain the selected files. All other files are moved out of the way. So, you have to select ALL the files in a zone. You cannot select only a few files, for example files that are far away.
Logged
Lexar
JkDefrag Hero
Posts: 91
Re: A New FileBoolean: Distance
«
Reply #9 on:
October 02, 2009, 11:58:25 pm »
Quote from: rjs_boy on September 26, 2009, 06:12:52 am
Quote from: Lexar on September 26, 2009, 01:08:48 am
With Distance(), you could select files that are listed on Layout.ini and far apart.
Code:
FileSelect
ImportListFromBootOptimize()
FileActions
<Insert Sort Action Here>
FileEnd
Wallah!
Puts everything in the Layout.ini into the same area on the disk.
No, that's not exactly what I want. I want to move down only those files that are too far up.
Logged
Lexar
JkDefrag Hero
Posts: 91
Re: A New FileBoolean: Distance
«
Reply #10 on:
October 03, 2009, 12:22:12 am »
Quote from: jeroen on September 26, 2009, 10:16:32 am
Quote from: Lexar on September 25, 2009, 02:57:46 pm
I then hit upon an idea that for a light daily optimization, it should be wise to grab only those files that happened to be unacceptably far up, and move them down.
Thanks for the explanation, that's what I thought. As I said before MyDefrag does not work like that. MyDefrag creates zones that ONLY contain the selected files. All other files are moved out of the way. So, you have to select ALL the files in a zone. You cannot select only a few files, for example files that are far away.
Fine, I would just put those files in a new zone, but a file that were far up would get moved down anyway. See the illustration below.
ACDFE_______________________________________________B
Each capital letter represents a file. File B happens to be far up.
If I should choose files ABCDEF and sort them, it will take a number of actions.
I would rather like to create a new zone for file B above file E, making the illustrated map like
ACDFEB_______________________________________________
Logged
jeroen
Administrator
JkDefrag Hero
Posts: 7155
Re: A New FileBoolean: Distance
«
Reply #11 on:
October 03, 2009, 07:29:48 am »
Quote from: Lexar on October 03, 2009, 12:22:12 am
Fine, I would just put those files in a new zone, but a file that were far up would get moved down anyway.
See the
FastFill
action. It does not do exactly what you want, but very close, it only moves files downward from "far away" and not move files already there.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
MyDefrag v4 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Scripts, and other contributions
-----------------------------
JkDefrag v3 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Programming with the library
Loading...