Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 24, 2013, 12:15:55 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: 3rd party software to move pagefile.sys and hiberfil.sys  (Read 6171 times)
rlg118
JkDefrag Hero
*****
Posts: 78



View Profile
« Reply #15 on: November 11, 2009, 04:47:06 am »

Has anyone suggested UltimateDefrag 2008? It can move and defrag these files at boot time.

Just to let you know, I have downloaded this program, and I found the following in the user manual:

"Note that in the trial version of UltimateDefrag and on 64-bit systems, while this feature is active and can be manipulated, the boot time module will not execute at boot time."

You would have to purchase the program in order to see if this actually works, I guess. I suppose that this prevents folks from using this feature and then tossing the program.
Logged

Rob G
Central New York, U.S.A.

"Sacred cows make the best hamburger." - Mark Twain
BloodySword
JkDefrag Hero
*****
Posts: 1113



View Profile
« Reply #16 on: November 11, 2009, 06:05:22 pm »

I'm interested on subjective performance changes. Please say something if this makes the system significant faster.
Logged

Greetings from Germany!
fxm
JkDefrag Senior
****
Posts: 35


View Profile
« Reply #17 on: November 11, 2009, 08:11:21 pm »


I was thinking that it might be possible that when MyDefrag encountered the pagefile it would programmatically disable the pagefile, create a new file, and enable the pagefile again.

FWIW:  one of the first things I did with jkDefrag [way back when Smiley] was create a file of the same size as pagefile.sys and let jkDefrag put it where I wanted pagefile.sys to be.

Then I disabled paging, renamed that file, then re-enabled paging.  The result was perfect, and the non-automated part took all of 30 seconds.
Logged
fxm
JkDefrag Senior
****
Posts: 35


View Profile
« Reply #18 on: November 11, 2009, 08:46:39 pm »

PageDefrag

I played with that too before trying the jkDefrag/MyDefrag method.

It appeared to me that PageDefrag relied on Windows (XP anyway) to find "suitable" gaps, and in that process empty areas that are large enough still weren't considered "suitable" if they contained reserved areas or were "too high".

In one attempt, for example, a 3G area wasn't used for a 2G file AFAICT solely because part of the otherwise empty area was NTFS reserved.

In another, the 2G pagefile.sys was allocated in two ~1G chunks when  larger empty spaces were available (but all of them beyond the middle of the drive).

BTW:  I observed what appeared to be the same avoidance of empty-but-reserved space in the Windows bootoptimize process.  MyDefrag solves that problem too Smiley
« Last Edit: November 12, 2009, 03:52:21 pm by fxm » Logged
BloodySword
JkDefrag Hero
*****
Posts: 1113



View Profile
« Reply #19 on: November 11, 2009, 08:56:09 pm »

I personally would do this like this (even with hiberfil.sys):

- Disable paging / Hibernate
- Delete pagefile.sys
- Reboot
- Do a weekly optimize
- Activate hibernation (on Vista you don't have to reboot)
- Activate paging (reboot needed)
- AnalyzeOnly - You can see your pagefile or hiberfil.sys are defragmented. Smiley
Logged

Greetings from Germany!
quanthero
JkDefrag Hero
*****
Posts: 234



View Profile
« Reply #20 on: November 11, 2009, 09:15:33 pm »

I personally never noticed any performance differences related to different pagefile placement.
Logged
fxm
JkDefrag Senior
****
Posts: 35


View Profile
« Reply #21 on: November 11, 2009, 09:53:08 pm »

I personally never noticed any performance differences related to different pagefile placement.

Your experience is surely the norm. 

When heavy paging (or even thrashing) occurs, it isn't easy to recognize which part of the sluggishness is the result solely of pagefile access time that could be reduced by moving that file.
Logged
torned
JkDefrag Senior
****
Posts: 22


View Profile
« Reply #22 on: November 11, 2009, 10:49:40 pm »

For  hiberfil.sys in console command type :
powercfg -h off
powercfg -h on

and it's done.
Logged
lh
JkDefrag Hero
*****
Posts: 83


View Profile
« Reply #23 on: November 12, 2009, 05:11:00 am »

I have done like fxm

I also use the fsutil to do it

C:\Windows\system32>fsutil file createnew
Usage : fsutil file createnew <filename> <length>
   Eg : fsutil file createnew C:\testfile.txt 1000

You can create a file of whatever size you like.  Also since windows creates the file almost instantly it usually is not fragmented.  You can then use mydefrag to put the file exactly where you like.

You will need to make sure both hibernation and pagefile is off.  Then you can safely delete the existing files.  Then rename the new files.  Also use attrib to set the file attributes correctly.  The downside to the pagefile is to turn it off you need to reboot.  However, to enable it you do not need to reboot.
Logged
fxm
JkDefrag Senior
****
Posts: 35


View Profile
« Reply #24 on: November 12, 2009, 01:31:41 pm »

Also use attrib to set the file attributes correctly.

I don't recall needing to do that in XP.
« Last Edit: November 12, 2009, 01:46:22 pm by fxm » Logged
tempeleng
Newbie
*
Posts: 2


View Profile
« Reply #25 on: January 06, 2010, 11:16:42 am »

@fxm and lh

I decided to try your method and yes, it works. But now there's a small problem. Using the "AnalyzeOnly" script I found that the pagefile has been fragmented into 2 parts after a restart.

Can you guys think of any reason why this might happen? Here are the steps I took to move the pagefile.sys

1) Disable pagefile. Restart laptop. Windows automatically deletes pagefile.sys
2) Create empty file in command prompt using fsutil file createnew alannull.aln 2147483648
3) Edited OptimizeMonthly script by adding the following at line 44 (it's after zone 2, so it becomes zone 3?)
Code:
  FileSelect
    FileName("alannull.aln")
  FileActions
    SortByName(Ascending)
  FileEnd
4) Ran the edited script
5) Renamed alannull.aln to pagefile.sys
6) Set the attributes to system and hidden at command prompt with attrib +S +H pagefile.sys
6) Enabled pagefile again. I set both custom sizes (initial, maximum) to 2048.

At this point WinXp tells me there's already a file with that name, do I want to use it as pagefile? I clicked yes, and everything was great. Then I restarted my laptop again and ran the AnalyzeOnly script to gloat over my success only to find out the file is fragmented in 2 pieces.

I'm wondering if I should add a gap after the pagefile by changing the script to this:
Code:
  FileSelect
    FileName("alannull.aln")
  FileActions
    SortByName(Ascending)
    AddGap(RoundUp(ZoneEnd,VolumeFree * 0.01))
  FileEnd
but I'm worried that the same problem will happen again. Please guide me Smiley
Logged
fxm
JkDefrag Senior
****
Posts: 35


View Profile
« Reply #26 on: January 06, 2010, 02:33:50 pm »

The following is VERY heavily edited.

I decided to try your method
...
2) Create empty file in command prompt using fsutil file createnew alannull.aln 2147483648
...

If you had called the new file pagefile.sys you would not have needed  step 5 (and the first step 6 was not needed in any case). [Of course your script would refer to pagefile.sys, not your 'fake' name.]
Quote
6) Enabled pagefile again. I set both custom sizes (initial, maximum) to 2048.

At this point WinXp tells me there's already a file with that name, do I want to use it as pagefile? I clicked yes, and everything was great.

there's a small problem. Using the "AnalyzeOnly" script I found that the pagefile has been fragmented into 2 parts after a restart.

Can you guys think of any reason why this might happen? Here are the steps I took to move the pagefile.sys


You need to check the area where you expect pagefile.sys to go very carefully for something unmovable (possibly very small).  Depending on the ownership of the file/fragment in question, to get it out of the way you may need to run your script in Safe Mode one time.  In pathological cases (the object is locked for no valid reason) you may need to use an unlocker.  Alternatively you can find/create a gap of suitable size near your target area.

FWIW  I thought I might have to "make room" in my script
Code:
  ReclaimNtfsReservedAreas()

  FileSelect
    SelectNtfsSystemFiles(yes)
  FileActions
    PlaceNtfsSystemFiles(Ascending)
    AddGap(UntilPercentageOfVolumeMultiple(0.01))
  FileEnd

  FileSelect
    Directory(yes)
  FileActions
    Defragment(Fast)
    FastFill()
    AddGap(PercentageOfVolume(1))
  FileEnd

  FileSelect
    ImportListFromBootOptimize()
  FileActions
    Defragment(Fast)
    FastFill()
    AddGap(PercentageOfVolume(1))
  FileEnd

# MakeGap(PercentageOfVolume(4))

  FileSelect
    Filename("pagefile.sys")
  FileActions
    Defragment(Fast)
    FastFill()
    AddGap(PercentageOfVolume(4))
  FileEnd

the first time I ran it, but it turned out that I never needed to enable the MakeGap [and I'm not sure that command/syntax still exists].
« Last Edit: January 06, 2010, 02:40:41 pm by fxm » Logged
fxm
JkDefrag Senior
****
Posts: 35


View Profile
« Reply #27 on: January 06, 2010, 03:03:26 pm »

This reply deals with a completely separate issue.


I found that the pagefile has been fragmented into 2 parts


I have done a fair amount of testing with XP.  My experience has been that simply using the custom setting with the proper max=min yields on the order of 99% of the possible benefit from "optimizing" the pagefile.  [In fact, the reduction in drive activity and corresponding increase in perceived system speed can be quite spectacular; in most cases I can attribute the effect to antivirus or other benign background processes.]  Allocating the file in a "good" location gains most of the remaining 1%.  Going from 2 [relatively nearby] fragments to 1 gains virtually nothing.
Logged
tempeleng
Newbie
*
Posts: 2


View Profile
« Reply #28 on: January 06, 2010, 04:49:17 pm »

Thank you fxm for the detailed reply, and your corrections to my steps.

So it seems to me that I have several options, which I will list down in most relevant order:

1) Leave it as it is. The performance gain if I repeat the steps will be unnoticeable
2) Repeat the corrected steps but do it in safe mode
3) Load up BartPE, and change the script a bit to directly move the pagefile.sys

I think I'll decide later but option 1 seems very attractive to me right now. Thanks again fxm for your help!
Logged
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!