Windows/Microsoft Pagefile

Discussion in 'other software & services' started by Kas, Apr 10, 2009.

Thread Status:
Not open for further replies.
  1. Kas

    Kas Registered Member

    Joined:
    Sep 29, 2008
    Posts:
    147
    Location:
    Bedfordshire - Rip-Off Britain
    Windows XP Home, SP3, IE7, OE6

    I have for a long time defragged almost every evening. No problem, I use Piriform`s Defraggler, it only takes a few minutes at the most defragging the file list. A few seconds if the list is small.

    Today, I found an enormous file list, mostly "system volume, dll" files. The fragmentation was 25% ! It took a long time to defrag them all and when it was done, there was a residue "pagefile.sys" left. This would not defrag.

    This pagefile is 777,864 KB and has 5 fragments (6%) and path "C:\". I have never had this file before listed. Maybe it has been there, but if not fragmented would not be listed.

    I have no idea where this massive list of fragged files or the pagefile.sys came from. Something has obviously happened.

    The only clue I have is that a panel has come up twice saying that "Microsoft will have to shut down as it has encountered a problem".

    On restart, all went as normal each time.

    * Where did this huge fragged file list come from ?
    * Why have I suddenly developed a pagefile of 777,864 KB ? which will not go away.
    * Will this pagefile disappear like it came ?
    * Is there some error lurking in IE or Windows ?
    * Can I delete or otherwise get rid of this pagefile ?

    You comments will be gratefully appreciated.
    KAS
    o_O
     
  2. lodore

    lodore Registered Member

    Joined:
    Jun 22, 2006
    Posts:
    9,006
    Hello,
    delete the page file and create a new one that is of a fixed one so it wont fragment.

    right click my computer,properties,advanced tab.
    under the proformance click on the settings button.
    click on the advanced tab.
    under virtual memory click on change.
    find the partition and set it as no paging file.
    click on ok ok etc until it asks you to reboot.

    then follow the above steps again to get to the same screen section.
    this time choose custom size and make it around the maximum size the current one grows to.

    hope this helps.

    even if you have tons of ram for example 4-8gb some programs will complain and wont work without a page file.
    if you have a second hard drive set no page file on C and instead create a fixed page file on second hard drive. internal drives only.
     
  3. jdd58

    jdd58 Registered Member

    Joined:
    Jan 30, 2008
    Posts:
    525
    Location:
    Arizona
    You could do as the above poster said or download Sysinternals PageDefrag.

    http://technet.microsoft.com/en-us/sysinternals/bb897426.aspx

    Also before you defragment, if you comfortable with it, delete all but your most recent system restore files. Start-Programs-Accessories-System Tools-Disk Cleanup. Go to the more options tab to clean up system restore.
     
  4. funkydude

    funkydude Registered Member

    Joined:
    Apr 5, 2004
    Posts:
    6,852
    Yes some programs and games will moan they need up to a gig and a half of page file. I always set the page file to Init:1536 Max:2048 no mater what amount of RAM.

    Also you can search for "PageDefrag" which is a Microsoft utility for defragging the page file and registry or defrag in safe mode which is where I always defrag.
     
  5. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
  6. ruinebabine

    ruinebabine Registered Member

    Joined:
    Aug 6, 2007
    Posts:
    1,097
    Location:
    QC
    Hi Howard,

    I receive "run-time error '70': Permission denied" error message. The wbemdisp.tlb type library is installed. Could it be caused by a required service that is not running on my xp pro sp2 setting?
     
  7. majoMo

    majoMo Registered Member

    Joined:
    Aug 31, 2007
    Posts:
    938
    You can also use "XP_PageFileMon" to check your Page File settings and usage.
     
  8. ruinebabine

    ruinebabine Registered Member

    Joined:
    Aug 6, 2007
    Posts:
    1,097
    Location:
    QC
    Thanks majoMo, but this one gave me the exact same error and substantiate what I tought about some tame OS' service on my tweaked system...
     
  9. majoMo

    majoMo Registered Member

    Joined:
    Aug 31, 2007
    Posts:
    938
    So it seems you have a problem indeed...

    Info: Link1 - Link2
     
  10. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Maybe you need to run as Administrator?
    Do not recall if I tried that.
     
  11. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    I just copied the program over to Vista.

    Runs without any prompts from Vista.

    The Run As Admistrator box is not checked, nor are any of the compatibility options checked, so I guess Vista has no issues.

    I have Win XP, to be used on an as yet unbuilt PC, so I cannot check out XP.
     
  12. ruinebabine

    ruinebabine Registered Member

    Joined:
    Aug 6, 2007
    Posts:
    1,097
    Location:
    QC
    Tinkering with XP's setting, I was able to make XP_PageFileMon (thanks majoMo for the link) to work:
    XP PageFile Monitor 02.png

    ...but PageFileUsageMonitor gives me now this error message:
    PageFileUsageMonitor error-9.png
     
  13. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    What XP settings did you change?
     
  14. aigle

    aigle Registered Member

    Joined:
    Dec 14, 2005
    Posts:
    11,047
    Location:
    Saudi Arabia/ Pakistan
    Hmmm.... what should be optimal page file size? I have put it to system managed size. Is it OK?

    Thanks
     
  15. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    It is most efficient to use a fixed-size page file, but one also does not want to waste space.

    On my Windows 2000 system, I have 2 page files:

    A fixed-size 64mb on th C drive.
    A variable-length file on another physical drive: min 128mb, max 1088mb.

    As we speak, the current usage on C is 62mb, with the max usage having been 63mb during the current windows session, i.e., since last reboot. This is with a fixed 64mb pagefile.

    As we speak, the current usage on the other page file is 214mb, with the max usage having been 217mb during the current windows session, i.e., since last reboot. The current pagefile size is 246mb out of the max 1088mb.

    I wrote PageFileUsageMonitor to monitor the page file size.
     
  16. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Are you using version 2.0.0.0 of the PageFileUsageMonitor?

    I just ran the prog on a Windows 2000 system with 2 page files, and a Windows Vista system with 1 page, no problems.

    Since you indicate that you have 1 pagefile, prog should work as there are no OS dependencies in the program, other than verifying OS is not earlier than Win 2000.
     
  17. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    I Just noticed that the code converted from Bill James does not include the Initial and Maximum size values for each file. Of course for a file being managed by the OS, these are "Not Specified".

    The original VBS code from Bill James included 2 scripts. One of which listed the Initial and Maxiimum sizes. Apparently, that script was not included in the VB 6 version of the program.

    In June 2008, I had to tweak the PageFileUsageMonitor in Vista to handle that case. So, I'm guessing that either ruinebabine has a problem with his/her XP settings, or I need to tweak my code for XP, which I cannot do until I build an XP system (later this year or next year) to try to replicate the problem.

    In the meantime, I'll try to find someone with an XP system with a single pagefile.
     
  18. ruinebabine

    ruinebabine Registered Member

    Joined:
    Aug 6, 2007
    Posts:
    1,097
    Location:
    QC
    It was reallowing vbscripts to run and starting a WMI service that seemed to have fixed the first error-code 70.
    Yes, I am using the version 2.0.0.0. And, actually, virtual memory is fixed value here: 6 mb on my system partition and 760 mb on a second internal HD.
     
  19. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    That's likely the problem.

    To get the Name, CurrentUsage, PeakUsage, and AllocatedSize info, Win32_PageFileUsage is queried.

    However, my program also queries Win32_PageFileSetting to obtain Name, Initialsize, and MaximumSize. Perhaps, that query is broken on your system.

    I've stepped thru the code with both Win 2000 abd Vista. All the correct cide branches are taken, be there 1 or 2 page files

    Does the following vbs code run on your system?
    You can run the code by plaxing it in a text file using the .vbs extension. and the doulble clicking the file.

    Code:
    For Each obj in GetObject("winmgmts:\\.\root\cimv2").ExecQuery(_
        "Select Name, InitialSize, MaximumSize from Win32_PageFileSetting",,48)
      s = s & obj.Name & vbcrlf
      s = s & "InitialSize: " & obj.InitialSize & vbcrlf
      s = s & "MaximumSize: " & obj.MaximumSize & vbcrlf & vbcrlf
    Next
    MsgBox s,,"Current Pagefile Settings"
     
  20. ruinebabine

    ruinebabine Registered Member

    Joined:
    Aug 6, 2007
    Posts:
    1,097
    Location:
    QC
    Hi Howard,
    PageFileUsageMonitor-TESTvbs.png
    But your program does not start and always is giving this same error message code 9 now, even after more tinkering on my OS' tweakings.
    PageFileUsageMonitor error-9.png

    By the way, I should have known better and first manualy check my pagefile's settings before my last post because, in fact, the snapshot I am now working in have it as 2 mg on C:\ and 766 mb on second HD:
    PageFileUsage.png
     
  21. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Ah, if the program does not even start running, then the problem is likely that you do not have the latest version of the VB 6 runtimes.

    A requirement is:

     
  22. ruinebabine

    ruinebabine Registered Member

    Joined:
    Aug 6, 2007
    Posts:
    1,097
    Location:
    QC
    VB6 was already installed. Reinstalled, to clear any uncertainty from this side. No change.
     
  23. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Did you install VB 6, or the VB 6 runtimes?
    If VB 6, make sure that you have also installed SP6.

    If VB 6 runtimes, make sure that you have installed the SP 6 version at VBRun60.exe installs Visual Basic 6.0 run-time files.

    Also, do you have the released XP SP3, or a a pre-release version of SP3?
    EArlier today, in another forum, I noticed posting about having trouble with pre-release SP 3 and VB.

    If none of the above solves the problem, since I do not currently have the time to build a PC with XP, I may buy a PC with XP, as this issue is driving me nuts! Fortunately, I recently had allergy tests that indicate I am no longer allergic to most nuts (indeed, this week, I shall purchase and eat peanut butter for the first time!).
     
  24. aigle

    aigle Registered Member

    Joined:
    Dec 14, 2005
    Posts:
    11,047
    Location:
    Saudi Arabia/ Pakistan
    Thanks. But i think there are some guidelines to adjust it according to your Ram size etc. I have only one internal HD.
     
  25. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    That's folklore that may have applied to pre-Win 2000 systems.

    As MSFT points out in KB articles 314482 and 889654, as memory increases, one does not need as large of a page file. And the newer OS are more efficient.

    MSFT may suggest large pagefiles so you could do a memory dump.
    I would never send a memory dump to anyone, as the dump contains way too much private info.

    Otherwise, unless you have apps that eat memory, having a large pagefile just wastes disk space and slows you down.

    On my system, Acronis True Image, almost always, causes the pagefile size to increase, but onlu to about a little bit over 200MB.

    If you monitor your pagefile usage with a program such as PageFileUsageMonitor, you will see how little you need for your particular application mix.
     
Loading...
Thread Status:
Not open for further replies.