Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 25, 2013, 10:54:15 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: A MUST DO, 4-th zone  (Read 11767 times)
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« on: November 23, 2008, 06:48:43 pm »

For a better defragmentation, spacehogs must be divided in 2 parts:
- temp/cache folders, user defined files/folders wich are very frequent modified/created at the end of zone 3;
- archives, disk images, multimedia files... less speed important files in zone 4, AT THE END OF THE PARTITION.

The files in zone 4 must be moved BEFORE the optimisation in the other 3 zones, to make more place for usual files.
This way, big files are rarely moved by JkDefrag in future runs.

I make this optimisation by running JkDefrag twice on each partition, first pass to create the zone 4 with useless files(include option) and second pass with exclde on those files.
Totally waste of time.
You can do it by default in future builds of 3.x (not waiting for 4.x).

And for portable guys like myself, workyng with huge number of big files, plugging 2 hdd each with 3 partitions in more than 3 computers, having very "colored" drive letter assignements, running JkDefrag and setting each run manually, twice for each partition, every 2-3 days is a real pain.
JkDefrag, when launched should use ini file in his dir for default settings and look for ini files on each partition root.
If found then use it, if not, use defaults.
This way, different purpose partitions will be defragged based on user wish.

SpeedDisk by Symantec works this way on w9x and is doing a great job.
Other great thing SpeedDisk is doing is the capability to move ALL files, even on active partition (JkDefrag or the used api is not capable even on partitions with NO OPEN HANDLES - tryed this with BartPE and chkdsk /x and red zones are still present and log contain unmoved files).

The daily used files are optimised in 4 zones by SpeedDisk:
- zone 1: pagefile, frequently accessed(not modified), sorted in 3 subzones (under 1 week, 2 weeks, 3 weeks) and by full path name);
- zone 2: files falling between z1 and z3 balanced by time and full path name;
- zone 3: mostly modified, sorted in 3 subzones (under 1 week, 2 weeks, 3 weeks) and by full path name);
- zone 4: temporary/cache/dump/cookies etc. folders/files;
- zone 5: FREE SPACE;
- zone 6: archives, iso, images, music, movies, dmp, hibernate (less speed important wildcarded files/folders) sorted by full path name.

SpeedDisk ALWAYS begins with z6 to make space to move important files.
I see builtin defrag is capable to defrag ALL files on dismounted partitions and JkDefrag can't.
Are you sure not miss something in api's control ?
Also, can you isolate wich files are necesary for JkDefrag to run at boot time like chkdsk?
If the MS API's are week and undocumented, perhaps some openSource can help?
No matter how, JkDefrag can be the best/lightest defragger for w2k-vista.

Ah, never tryed (mea culpa), what do I need to compile the souces (wich compiler and what extra libs).
I don't intend to steal your work, just to get an idea and try to improve if I can.
I'll try even if the only language I know and use is pascal dos/console mode, no gui knowlege.
I'd like to help you.
Just ASK !

I've seen at http://www.kessels.com/forum/index.php?topic=1232.0 the script idea for 4.x. Too complicated for basic users. I think an simple ini type with 1/0 selection for enable/disable and commented predefined keywords is more suitable for users (my opinion). Also this can simplify the program understanding/interpret of the script file because scripting cfg file need compiler like interpretation, ini style has fixed decisions (my opinion).
« Last Edit: November 23, 2008, 07:56:50 pm by teddy » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #1 on: November 23, 2008, 08:07:22 pm »

Are you sure not miss something in api's control ?
JkDefrag v4 will be able to move more files. While developing v4 I have found why v3 could not move certain files.

Quote
Also, can you isolate wich files are necesary for JkDefrag to run at boot time like chkdsk?
It's not as simple as that. Programs such as chkdsk are specially programmed, using special Microsoft libraries. I have it on my list to make a special boot-time version of JkDefrag, but it's a lot of effort for only a few files.

Quote
what do I need to compile the souces (wich compiler and what extra libs).
See the "doc/compiling.txt" file in the sources zip. Please note that JkDefrag v3 is more or less frozen and that I probably will not release another v3 version, I am concentrating on v4 right now.
Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #2 on: November 24, 2008, 06:35:55 pm »

Newbie salute you Jeroen!
Thank you for the quick reply.
I will try to get VisualC (or c++?) from somewhere, the free fersion and hope to get this sdk somehow to try myself the strategy I've written before. I have seen there is also some code for FreePascal to use with the dll but this source does not have the placement routines so I must go to visualC. Can you share to me some links where to get the free compiler+SDK. I work with w2k and don't think 2008 version will work without XP.
I'll do my best.
Please keep in mind the ideas/advices from previous post, to make v4.x simple and reliable(zones, config files in root of partitions).
I think the boot defrag can embed somehow some content from windows dll's wich are not yet loaded at boot time but can be forced to load by the defragger, or he can contain them(at least the needed functions decompiled in ASM).
Boot defrag can be done by some open source (by his own forces) at wich you can take a look if you want some ideas.
About the simplity, I'll stay on 5+freespace zones in the ini files, params for each zone : order by size, name ,time(asc/desc) for first three zones and wilcards, type, size for the end of drive, BUT, you're the MASTER to decide.
With your permission and maybe some little help (at resources chapter) I'll try to plug the 4-th zone and the ini files and in case of success, the decission to include them is in your hands.
Before I start, I wish to know your opinion.
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #3 on: November 24, 2008, 07:23:03 pm »

Can you share to me some links where to get the free compiler+SDK.
Only this: http://www.microsoft.com/Express/Download/

Quote
I work with w2k and don't think 2008 version will work without XP.
Sorry, I have no idea.

Quote
Please keep in mind the ideas/advices from previous post, to make v4.x simple and reliable(zones, config files in root of partitions).
Version 4 will have a small but very flexible scripting language. Amongst other things you can create as many zones as you want, specify which files go into which zone, and how to handle a zone. Selecting volumes and which actions to perform for a volume is equally flexible.

Quote
I think the boot defrag can embed somehow some content from windows dll's wich are not yet loaded at boot time but can be forced to load by the defragger
It's not as simple as that. For more information see http://technet.microsoft.com/en-us/sysinternals/bb897447.aspx

Quote
the decission to include them is in your hands.
Thanks for the kind offer and I appreciate your enthusiasm, but as I said before version 3 is more or less frozen. I will only release a new version if I find a serious bug. Version 4 is a complete rewrite. It is therefore extremely unlikely that I will use any code that you submit.
Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #4 on: November 25, 2008, 12:19:50 am »

Supposing I can understand VisualC
Supposing I can understand your piece of work
Supposing I can make something better than you
At least I want hard to try if you don't mind.
I hope to get some advice in case of some dead end.
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #5 on: November 25, 2008, 09:42:34 am »

At least I want hard to try if you don't mind.
I hope to get some advice in case of some dead end.
I don't mind if you try, and I am certainly willing to help with advice, provided that it does not take too much of my time.
Logged
Eric2
JkDefrag Hero
*****
Posts: 98


View Profile
« Reply #6 on: November 26, 2008, 05:07:04 pm »

teddy,  thanks for your proposal, I will be also quite interested by your proposal, as I already run 2-pass of Jkdefrag  , one with -a6 to move like you media files at the end of te partition, and then one with -a3 for the other files.
Having ini file for the parameters and in particular for the spacehogs or -a6 list   is a very good idea, I suggested it as well in the past.
So yes I will be a user candidate for you new version 3  of Jkdefrag.
 Wink

Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #7 on: December 01, 2008, 02:13:52 am »

Thank you for support Eric2.
I'll try to do my best.
For now,  I try to accomodate with VisualStudio2008Free and Jeroen sources.
I know I am working with deadline for 3.x as Jeroen said, but my effort will be to:
- implement a 4-th zone at the end of partition (first pass by default)
- the precise settings to be readed from jkdefrag.ini on the root of each partition (if the file not found, the defaults are applied).
This could be the last improvement for 3.x(if Jeroen don't make it himself for 3.x) and SHOULD be the FIRST to do in 4.x (hope sooner than mine).
As I said, I've worked a lot with Symantec's SpeedDisk wich operates as I'll try to do with the 3.x.
A bug that will remain perhaps is the bug to not be able to move ALL UNLOCKED FILES, but that's what Jeroen try to solve in 4.x(not just that).
My ideas can be more easy to implement by the author (not a newbie on visualC), but if he said it's frozen, I'll try to make this, even to prove myself I can do it !
Perhaps more subscriptions to this ideas can turn Jeroen from the frozen to an 3.4x with this 2 pieces added ?
Logged
Eric2
JkDefrag Hero
*****
Posts: 98


View Profile
« Reply #8 on: December 01, 2008, 05:15:18 pm »

Excellent teddy!  I'd like to wish you all the best in this effort and I am looking forward testing your new customized v3.xx of Jkdefrag.
As you will incorporate the -a 6 option  in one-pass  note that there is a little bug currently in the official v3.36 of Jkdefrag regarding the "-a 6"  option; this option is supposed to force-fill  the specified files at the end of disk; this works very well except for big files ( ~ GB)  when  smaller gaps exist at the end of the disk; I mean that it may not always force-fill the gaps as it should do, leaving possibly some important number of gaps at the end. It looks like Jeroen has implemented in his version a ratio between the size of the file to move and the existing gaps at the end of the disk... and that above this ration Jkdefrag doesn't split the file to fullfill the gaps...    I may be wrong but just in case you find what it is  when looking at the source code  it would great to improve or to fix it.
Good luck.
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #9 on: December 02, 2008, 05:07:28 am »

there is a little bug currently in the official v3.36 of Jkdefrag regarding the "-a 6"  option; this option is supposed to force-fill  the specified files at the end of disk
Perhaps it would be more useful if "-a 6" were to force fill, but that's not what it is designed to do right now and it is therefore not a bug. At the moment it works similarly to the "-a 3" option, it fills gaps. Big files are only moved to the end of the disk if there is a gap big enough to hold the file.
Logged
Eric2
JkDefrag Hero
*****
Posts: 98


View Profile
« Reply #10 on: December 02, 2008, 11:43:47 am »

Thanks Jeroen for your explanation. So you did it on purpose.
Sorry but I don't understand then your change applied on "-a6" option since v3.35 (you wrote "- Changed the algorithm for "-a 6" (move to end of disk) to better fill gaps.")...

A bit of history :  Some users and myself have been reporting over the last year at several occasions that it would be great if this "-a6"  option would be able to move files at the end of the disk regardless of existing gaps being there or not.. because when we ask Jkdefrag to move a file at the end of the disk we would really like to move it there  even if it means splitting that file to fill the gaps, the priority being more to move the file there than having a performance issue due to file fragmentation there; performance access does not matter for those files which are moved at the end of the disk!
To simplify our request we wondered if you could make -a6  working  for the end of the disk exactly like -a5 works for the beginning of the disk, i.e. force fill the gaps...
 
Then we received from you a nice surprise when you released v3.35  announcing that  one change was actually to change "the algorithm for "-a 6" (move to end of disk) to better fill gaps.")
So I thought you did it  , making "-a6"  like  "-a5"  but for the end of the disk.
I tested and used it many times and I noticed the improvments made with "-a6" option, except  for big files which were still not moved... I thought of a bug because I could not see the design reason for not moving the big files the same way as the others.
Why have you coded then in purpose a size limit for the -a6 option ?  .. and why do you do like that for -a6 and not for -a5 ?


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



View Profile WWW
« Reply #11 on: December 02, 2008, 12:34:34 pm »

Quote
Why have you coded then in purpose a size limit for the -a6 option ?
There is no size limit. The big files in your case are probably not moved because there are some tiny little unmovable files there, splitting what looks like a big gap into smaller gaps. In version 4 of JkDefrag it will be possible what you want, forcibly moving files to the end of the disk.
Logged
Lundholm
JkDefrag Hero
*****
Posts: 208



View Profile
« Reply #12 on: December 02, 2008, 03:08:49 pm »

Just a little note on the "move to end of disk" topic, which seems to pop up at regular intervals.

It is only a good idea to move files out of the way, if they are in fact never used. So forget about virus scans and other small utilities that just happen to read all files, or you will create a large load on the disk, which eliminates any benefits of the defrag and optimization.

In general, moving things to the end of the disk is a bad idea. Jeroen's general strategy of moving files forward and together just happens to be very good. Wink
Logged

"O, there has been much throwing about of brains." -- Guildenstern{alt. Gyldenstern[alt. Gyldenstjerne(anc. Gyllenstierna{knight of Lundholm})], knight of Hamlet}.
Eric2
JkDefrag Hero
*****
Posts: 98


View Profile
« Reply #13 on: December 03, 2008, 01:38:19 pm »

I do it for big files rarely accessed, like old photo albums and video files..
moving them at the end of disk  free-up  faster locations for the normal daily usage of Windows, and allows me to exclude them when running a regular -a3  defrag  (faster runs of JkDefrag and no need to touch the files which are at the end of the disk)... so yes it makes sense to me.

Probably a better way is to create a second partition on the disk, or having another disk, to store away the album photos and big video files... but I have some computers I don't want or can't do it.



Logged
Lundholm
JkDefrag Hero
*****
Posts: 208



View Profile
« Reply #14 on: December 03, 2008, 01:57:56 pm »

Probably a better way is to create a second partition on the disk, or having another disk, to store away the album photos and big video files... but I have some computers I don't want or can't do it.

Yes, of course. But when you suggest something sensible like this, you will receive a lot of arguments against it.  Wink
Logged

"O, there has been much throwing about of brains." -- Guildenstern{alt. Gyldenstern[alt. Gyldenstjerne(anc. Gyllenstierna{knight of Lundholm})], knight of Hamlet}.
Pages: [1] 2
  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!