Kaseya Community

High Memory Usage in MyDefrag (formerly jkdefrag)

  • Has anyone else seen massive memory usage in MyDefrag? (the program formerly known as jkdefrag) I have been running it on PCs for a while with great results.

    I ran it on a server last night and it consumed 2.5GB RAM (on a 32bit Server 2003 with 3GB!) I killed it immediately.

    I see lots of reports about the problem but no fix. For example,
    http://www.mydefrag.com/forum/index.php?topic=3154.0
    http://www.mydefrag.com/forum/index.php?topic=1622.0

    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. Sorry, but this is not an error or a bug, 8 million files is simply too much for MyDefrag.

    8 million files would be 4 gigabyte, and MyDefrag is limited by the maximum amount of memory that Windows will give it.

    the program needs the full list of all files in memory at all times, for example to find the files that must be vacated

    If you don't like the memory usage then don't use (a script that uses) the FullPath fileboolean or the SortByName fileaction.


    I wasted hours trying to get it to work and ended up using Defraggler instead! I saw it use 50MB RAM at it's highest! I'm looking for one tool that I can use on workstations and servers, regardless of how much RAM and how many files they have.

    If someone has been through this and came up with a solution I'd love to know. MyDefrag seems so much more advanced than Defraggler that it must be better, right?

    But then I think; If I have to write a script that doesn't use FullPath or SortByName, is it really doing anything better than the other programs?

    Legacy Forum Name: High Memory Usage in MyDefrag (formerly jkdefrag),
    Legacy Posted By Username: djmundy
  • I am just writing the uber defrag script and am using mydefrag as the base. this is disconcerting.
    In my tests I havent seen anything like that. And I'm really trying to think if I've ever even seen a PC or server with even 1 million files. So I'm not to worried yet.
    Please post back if you hear anything else.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: JointTech
  • I didn't bother to post on their forums as the issue is obviously known to the developer, so that wasn't me with a million files Wink

    The server I had troubles with had 68550 files and 3405 folders on the data partition. And the memory usage for mydefrag.exe went over 2GB.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: djmundy
  • have you tried the slowdown param in the script? I think thats just for CPU but may be of help? I run at slowdown75.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: JointTech
  • Yep I set SlowDown to 50 and it didn't make a difference with the memory usage.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: djmundy
  • I think the key take away is:


    If you don't like the memory usage then don't use (a script that uses) the FullPath fileboolean or the SortByName fileaction.


    Andrew

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: andrew.doull@computer-care.com.au
  • Thanks Andrew, that is definitely the key take-away, but the key question remains:

    If I have to write a script that doesn't use FullPath or SortByName, is it really doing anything better than the other programs?


    Smile

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: djmundy
  • So it sounds like sticking with JkDefrag has been the right decision... good to know...

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: GreyDuck
  • GreyDuck
    So it sounds like sticking with JkDefrag has been the right decision... good to know...


    Given that they're both written by the same guy, MyDefrag has significant advantages to JKdefrag regards improving startup performance in windows, and JKdefrag was hands down the best defragmentation product that any of my customers worked with, I'm surprised at the negative reaction to a corner case in MyDefrag that isn't required for the product to defrag a whole drive.

    Andrew

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: andrew.doull@computer-care.com.au
  • I have been usig JKDefrag successfully for almost 2 years, and have been very pleased. I had not yet looked at the updated MyDefrag, but was planning to do so - to see what new features/functions are available.

    Fro this post, it seems that the FullPath or SortByName features are new, and are causing some problems. Coudl you tell me (briefly) what they are suppsoed to do? (sorry, I know I coudl probably lookup myself, but I thougth I would ask). Are they very important?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: lwolf