Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 25, 2013, 06:05:19 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: reserveGap  (Read 1015 times)
UlfZi
JkDefrag Senior
****
Posts: 25


View Profile
« on: May 08, 2010, 10:47:38 pm »

I think it would be nice to have a command to reserve a gap free from MyDefrag usage.
This would be helpful to reserve a distinct area at a distinct position to remain free for later page file use after enabling virtual memory again.
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #1 on: May 09, 2010, 03:59:06 am »

See the MakeGap command.
Logged
UlfZi
JkDefrag Senior
****
Posts: 25


View Profile
« Reply #2 on: May 09, 2010, 02:37:01 pm »

If I understand right, a normal gap could be overwritten.
Example:
In the monthly script a gap is made at 30 % for the MFT + directories, but after, because of makeGap(0), the gap is overwritten by the following zones.
My goal would be to have a 1GB gap before the MFT zone, reserved for the page file.
How would that work?
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #3 on: May 09, 2010, 06:39:42 pm »

If I understand right, a normal gap could be overwritten.
Ah, I see what you mean. Yes, if the zone cursor is moved downwards by a MakeGap command then any gap will be overwritten. Perhaps in the future I will add something so that gaps will be remembered, but for now the workaround is simply to make the gap AFTER the zone cursor is moved downward with MakeGap(0), not before.
Logged
Darlis
JkDefrag Hero
*****
Posts: 1710


View Profile WWW
« Reply #4 on: May 09, 2010, 06:47:45 pm »

for now the workaround is simply to make the gap AFTER the zone cursor is moved downward with MakeGap(0), not before.
But already processed files won't be vacated, won't they? So, the gap has be be created by a new script.
Logged

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



View Profile WWW
« Reply #5 on: May 09, 2010, 07:09:02 pm »

But already processed files won't be vacated, won't they?
I am sorry but it makes no sense to me that you would want to vacate already processed files. Please note that in the monthly script there are no processed file before the 30% mark, at the time the zone cursor is moved downward. In other words, the first 30% of the disk is completely free to do with what you like, such as making a big gap. I don't know how big your disk is but surely it is big enough so that there is room for a 1Gb gap in that 30%.

p.s. The pagefile can be moved and defragmented by MyDefrag just like any other file if you boot from a CDROM (see How to use MyDefrag from a bootable CD-ROM or memory stick?). No need for complicated trickery. And if you set the pagefile to a fixed size then it will never need to be moved again. For more information see How do I defragment "C:\pagefile.sys" (the swapfile)?
Logged
UlfZi
JkDefrag Senior
****
Posts: 25


View Profile
« Reply #6 on: May 11, 2010, 03:41:49 pm »

If I understand right, a normal gap could be overwritten.
Ah, I see what you mean. Yes, if the zone cursor is moved downwards by a MakeGap command then any gap will be overwritten. Perhaps in the future I will add something so that gaps will be remembered, but for now the workaround is simply to make the gap AFTER the zone cursor is moved downward with MakeGap(0), not before.
That works, but is not that, what I want.  Huh The gap would be located anywhere in the 30% area.
I want to have it exactly before (or after) the MFT zone.
In worst case, the gap would be folded around the MFT+Dirs zone.  Roll Eyes
Logged
UlfZi
JkDefrag Senior
****
Posts: 25


View Profile
« Reply #7 on: May 11, 2010, 03:51:01 pm »

p.s. The pagefile can be moved and defragmented by MyDefrag just like any other file if you boot from a CDROM (see How to use MyDefrag from a bootable CD-ROM or memory stick?). No need for complicated trickery.
1.) If you just have such a CD or stick, maybe, but creating such a media is tricky/time-consuming enough.
2.) Boot optimization wouldn't work !!

Quote
And if you set the pagefile to a fixed size then it will never need to be moved again.
Too restrictive for me. I want to have 1GB fix + 500MB reserve.
Logged
Darlis
JkDefrag Hero
*****
Posts: 1710


View Profile WWW
« Reply #8 on: May 11, 2010, 04:19:12 pm »

You could use this to make the gap you want:
Code:
VolumeActions

  /* Place files at 30% into the data on the disk. */
  MakeGap(RoundUp(VolumeUsed * 0.3,VolumeSize * 0.01), DoNotVacate)

  /* Zone 1: Place the MFT and some other special NTFS files. */
  FileSelect
    SelectNtfsSystemFiles(yes)
  FileActions
    ZoneOneBegin = ZoneBegin
    PlaceNtfsSystemFiles(Ascending,MftSize * 0.1)
  FileEnd

  /* Zone 2: Directories. */
  FileSelect
    Directory(yes)
  FileActions
    SortByName(Ascending)
  FileEnd

  /* Set cursor to 1.5 GB before the MFT */
  MakeGap(ZoneOneBegin)

  /* Clear gap of 1.5GB */
  MakeGap(1.5GB)

VolumeEnd

You cannot use any (boot) optimization in this script, because it would fill the gap again.
You would then have to: Disable the pagefile, restart, run the script and directly enable the pagefile, then restart. This will not work if there are unmovable files in the gap.

Quote
And if you set the pagefile to a fixed size then it will never need to be moved again.
Too restrictive for me. I want to have 1GB fix + 500MB reserve.
Easy solution: Set the size to 1.5GB. Will safe you a lot of trouble.
Logged

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



View Profile WWW
« Reply #9 on: May 11, 2010, 04:25:33 pm »

I want to have it exactly before (or after) the MFT zone.
Why? There is no speed advantage in that. But if you absolutely must have it then just make a script that does not move the zone cursor, just place the zones one by one.

Quote
1.) If you just have such a CD or stick, maybe, but creating such a media is tricky/time-consuming enough.
You can download ready-to-run CD's from various places on the internet. Good to have in case of emergencies.

Quote
2.) Boot optimization wouldn't work !!
You can make it work, see the page I mentioned before. Also see the ImportListFromFile command, specify the Layout.ini file on your c: disk.

Quote
Too restrictive for me. I want to have 1GB fix + 500MB reserve.
Then you are destined for a lot of work every time the pagefile get's fragmented.
Logged
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!