Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 25, 2013, 06:44:52 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: Limit File Enumeration to Path (instead of volume)  (Read 1477 times)
vagabund
Newbie
*
Posts: 2


View Profile
« on: March 12, 2011, 01:59:39 pm »

I have a volume with several million files, where most of the files are hard links and, therefore, only consist of a directory entry.

My goal is to defrag all directories under a certain path. MyDefrag's superb scripting support can certainly handle this task and that's why I am quite convinced that MyDefrag is the ideal tool for it.
But: MyDefrag runs into the "Oeps! Memory full" exception even before the first million files got enumerated. MyDefrag uses almost 2 GB RAM in this case (of the machine's physical 4 GB) .

An enhancement to MyDefrag could help here:
Limit MyDefrags analyzation phase to a certain sub-path of a volume. So, instead of a top-level "VolumeSelect" a "PathSelect" could reduce the number of files seen in the enumeration phase.

This approach, of course, renders many optimizations like sorting rather useless but would allow to defrag volumes with many files.

What do you think: would my proposal be a valuable new feature? Or is there a workaround with the existing functionality?
Logged
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #1 on: March 12, 2011, 02:34:27 pm »

Since this "feature" would make almost any other feature of MyDefrag useless, it is not worth implementing imho (if that's even possible). There are a lot of other defraggers if you just want plain defragmentation.

Do you have a 32 bit OS? Then add the /3GB /USERVA=2990 switches to the boot.ini. This will allow MyDefrag to use up to 3GB instead of 2: http://support.microsoft.com/kb/316739/EN-US/

If you have 64 bit OS make sure you are running the 64 bit version of MyDefrag: start the MyDefrag script chooser and look at the process name in the Taskmanager. If there is "*32" appended to "MyDefrag.exe", you're running the 32 bit version.
Logged

Need help creating a script? Try MyDefrag Script Creator.
vagabund
Newbie
*
Posts: 2


View Profile
« Reply #2 on: March 12, 2011, 05:10:13 pm »

Thanks for your reply.

Just a short notice concerning the 32/64 bit issue:
I am running the 32 Bit version on a 64 Bit OS (because it's launched form the network where I still have many 32 Bit machines). I gave the 64 bit version a try, and as expected its memory consumption is almost identical (about 2 kiBytes per file). The 64 Bit version probably won't tell me "oeps!" but still require more than the machine's memory.

I never had a look at Windows' defrag API. But I'm quite confident, that the memory (and time) consuming part of MyDefrag's analysation phase is to get the info which file uses a cluster-- not which cluster is actually containing data or empty.
So I'm asking for a way to limit the scope of this enumeration process. So that not every file on the volume must be pressed through this expensive phase. I still hope my favorite defragger will improve it's handling of such huge file counts Smiley
Logged
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #3 on: March 12, 2011, 06:27:51 pm »

I found Jeroens post about memory consumption:
The amount of memory that MyDefrag uses depends on things like the number of files and directories on the disk, the number of fragments, the length of directory and filenames, whether or not NTFS compression is used on the disk, which MyDefrag script you are using, and more. A rule of thumb is that MyDefrag uses about 500 bytes of memory per file on disk.

You seem to have "special" files if you need 2KB per file. Apart from running the 64 bit version, there is nothing you can do right now. You have to wait for Jeroen, what he thinks about a "light" version.
Logged

Need help creating a script? Try MyDefrag Script Creator.
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #4 on: March 13, 2011, 02:03:18 am »

But I'm quite confident, that the memory (and time) consuming part of MyDefrag's analysation phase is to get the info which file uses a cluster-- not which cluster is actually containing data or empty.
Thanks for sharing your idea, I appreciate it. You are correct, the analysis gathers information about which file is occupying which cluster. This is essential information, without it MyDefrag would not be able to perform many of it's functions, especially disk optimization. Reducing MyDefrag's memory usage has been discussed many times before, and many ideas have been offered. Limiting the analysis to only certain folders is one of the possibilities, but there are better solutions which would not hamper the capabilities.
Logged
poutnik
JkDefrag Hero
*****
Posts: 1105


View Profile
« Reply #5 on: March 13, 2011, 01:35:41 pm »

Do you have a 32 bit OS? Then add the /3GB /USERVA=2990 switches to the boot.ini. This will allow MyDefrag to use up to 3GB instead of 2: http://support.microsoft.com/kb/316739/EN-US/

Correct me if I am wrong, but this is limitation of the whole OS.
Is not there another limitation 2 GB for process ?
( or more exactly 2 GB for user mode and 2 GB for kernel mode )
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.
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #6 on: March 13, 2011, 03:09:03 pm »

Correct me if I am wrong, but this is limitation of the whole OS.
It limits the amount of memory available for the kernel to about 1GB, yes. But how often does it need more than that?
Logged

Need help creating a script? Try MyDefrag Script Creator.
poutnik
JkDefrag Hero
*****
Posts: 1105


View Profile
« Reply #7 on: March 13, 2011, 03:44:31 pm »

It limits the amount of memory available for the kernel to about 1GB, yes. But how often does it need more than that?
Hardly ever.
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.
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!