Windows/Microsoft Pagefile

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

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

    aigle Registered Member

    Joined:
    Dec 14, 2005
    Posts:
    11,164
    Location:
    UK / Pakistan
    Thanks. I have used this application in the past and will try again.
     
    Last edited: Apr 12, 2009
  2. majoMo

    majoMo Registered Member

    Joined:
    Aug 31, 2007
    Posts:
    994
    I'm using XP and Pagefile Usage Monitor is working like a charm. Maybe a problem in the ruinebabine XP system.

    To adjust pagefile size this utility is excellent. Better than the ram'tweaks (*1,5 min/*3.0 max).
     
  3. Rmus

    Rmus Exploit Analyst

    Joined:
    Mar 16, 2005
    Posts:
    4,020
    Location:
    California
    In Win98 days, the Page File was referred to as the Swap File since the theory was that when your available Memory (RAM) was used up, Windows "swapped" data to disk (Page File). If you had enough memory, nothing was ever swapped to disk, except what Windows puts there for its own use. So, you could keep the Page File small.

    Along comes Win2K and 1.5x the available RAM is recommended. (I don't recall that in Win9x). Well, that is a lot of wasted space, since I want my C partition to be small for just the OS and related stuff. But maybe the NT5 OS works differently with Memory than Win9x. Time do do some reading:

    Configuring Operating System Settings
    http://windows-cert.net/MS.Press-MCSE.Training.Kit-M1/ch04d.htm
    So, the principle is the same in Win2K, just a different approach.

    What is the Page File for anyway?
    http://blogs.technet.com/askperf/archive/2007/12/14/what-is-the-page-file-for-anyway.aspx
    I found that my programs on the Win2K system weren't using any more Memory than on Win9x. (The real improvement was how threads are managed which eliminated the problem of depleted resources - User and GDI).

    I found that the Page File was always small, probably from normal Windows stuff - nothing swapped from depleted available RAM. I concluded, no necessity for a large Page File. Also, I never noticed any difference with adding a Page File on my 2nd internal HD, so I use just one.


    ----
    rich
     
  4. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    I believe that ruinebabine stated that the program would not start and that the error occurred before the Form was displayd.

    This can happen ONLY if the LOAD Event, i.e., the code that creates the Form fails.

    All that the Load event does is:

    1. check whether the OS is Win 2000 or later. This is done using the GetVersionEx API function. It's not OS dependent.

    2. Checks whether wbemdisp.tlp is installed. So, on ruinebabine's system, wbemdisp.tlp was installed, but the services had not been started. I'll, eventually, look into whether I can check those services in the load event.

    3. Checks whether another instance of the program is running. No point in allowing more than 1 copy of the program to run at the same time.

    4. Then the controls on the Form are given their values.

    5. Then the log file is opened.

    6. Finally, the Load event displays the Form.

    Prior to this point, the only things that could go wrong are:

    a. Improperly installed WMI
    b. Improperly installed VB 6 or VB 6 runtimes.
    c. Issue with XP or SP3. In another Forum, I saw threads just today describing a problem with pre-release SP3 for VB.

    Given that the program works in Win 2000 and Vista, and others have had success with XP, I am puzzled.

    That's why I wrote the program.

    There was a noticeable improvemen in system performance after I reallocated the pagefils.

    I have 10 logical drives on 3 SCSI hard drives.
    There are 4 OS.
    1 on C on drive 1.
    2 on F and G on drive 2.
    1 on J (my main OS) on drive 3.

    So I set a small (64MB) fixed-length file on C, and a larger variable-length page file on G, min 128, max 1088. Used to have a min of 64MB oh G, as well, but Acronis True Image almost required at least 128MB, so I yelled Uncle!

    I rarely boot to the OS on C, F, and G
     
  5. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Ooops, forgot to mention:

    d. SP 6 for VB 6 or the VB 6 runtimes is not installed. SP6 was released more than 5 years ago.
     
  6. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    All OS, from the 1st computer and al future computers have always swapped stuff in/out of memory.

    Heck the first computer I seriously programmed (IBM 1620) had only 20000 characters of memory.

    It was quite a leap when I started programming an IBM 36/30 with a whopping 64K of bytes, WOW!

    IBM made a big deal about swapping/paging when the IBM 370 was announced. Folkes got all excited.

    Over the years programming techniques have gotten better, but the underlying mapping of physical memory to page/swap files is still with us.
    Also, memory and disk drives are much less expensive.
     
  7. ruinebabine

    ruinebabine Registered Member

    Joined:
    Aug 6, 2007
    Posts:
    1,096
    Location:
    QC
    The runtimes, from the link that you provided.
    Xp Pro sp2, as already stated I think.
    Yes, only the run-time error 9 message, but it also produces (but doesn't display) an empty "PageFileLog.txt" file in its folder at each new try to run.

    LOL! I was not trying to be your nutfeeding pusher in any ways, Howard. Simply would like to pinpoint why my pc's settings are nut allowing your prog to run as it should. And, reading here that PageFileUsageMonitor is making good on other XP's systems, we might safely assume that the problem is from my side. I will continue to try to make it work and report back here of any progress.
     
    Last edited: Apr 13, 2009
  8. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Good. See below

    In the lead posting, you had stated XP Home and SP 3.

    THelast thing that the Load event does is open the file, then get the pagefile info to display when te Form is displayed.

    I've stepped thru that code in both Win 2000 (1 and 2 page files) and Vista ( page file). The code is executing correctly, and others are using the prog succcessfilly, so either there is a problem on your system or my code has one of the most suble bugs ever encountered.

    The code is really very simple, and I have not found an error, but that does not mean there isn't one.

    I'll be competing with the local squirrels for nuts.
     
  9. ruinebabine

    ruinebabine Registered Member

    Joined:
    Aug 6, 2007
    Posts:
    1,096
    Location:
    QC
    All OKs, but...
    ...t'was Kas' post.
     
  10. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Sorry, this thread has made me bleary eyed.

    I was thinking last night that, if somehow I do have a subscript issue in the code, or an issue related to subscripts caused by your installation, I may try to rewrite the code to use less subscripts. Code would likely be less efficient, but that might eliminate the problem you see.

    Although, if my code has a subscript issue, then others should be seeing the same problem.
     
  11. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Ooops, I was just going thru some mail folder, and found a message that I received dated 3 Sep 2008. I missed reading the message.

    He reported a problem running the program when there was NO page file.

    I cannot seem to find a way to tell Win 2000 to manage pagefiles itself.
    If I delete the pagefiles, Windows 2000 creates a temporary page file that the program detects.

    I think that I know how to tell Vista to manage the pagefile.
    I'll test there later today.
     
  12. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    I forgot to mention that I do not know what verson of the program he was using.
     
  13. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Whew!

    vista is set up to handle the pagefile itself and version 2.0.0.0 of the prog handles that.

    Why I created version 2.0.0.0
     
  14. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
  15. CatFan432

    CatFan432 Registered Member

    Joined:
    Nov 1, 2006
    Posts:
    333
    Location:
    Topeka, KS, US
    ruinebabine, Howard,

    Regarding the “Runtime error ‘9’: Subscript out of range” message when using Howard’s Pagefile Usage Monitor:

    I’m running WinXP, SP3, and have two hard drives, one of which is mounted in a removable tray. I have two pagefiles, one on each HD. I keep a small pagefile on the permanent HD, as Windows will create a much larger one if there isn’t one already there. I have a larger one on the removable HD, as that seems to help photo processing.

    If I start my computer without the removable drive, I will get the “Runtime error ‘9’: Subscript out of range” error message. If both drives are mounted, Howard’s program works great. So, just something to check; if Windows boots up looking for a pagefile that it doesn’t find, perhaps this causes the error. This is just from observation, I know little to nothing about the mechanics of this stuff.

    Regards, CatFan
     
  16. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Thanx.

    THat makes sense.
    The OS knows that there's another page file, so if the file cannot be found, the OS gives a less than useful message.

    All my prog can do is ask WMI how many page files exist.
    That info likely comes from the registry, without checking for physical existence.

    I've rewritten my code to reduce the number of subscripts.
    Should not make any difference, but, heck, we are dealing with Windows!

    The new version is temporarily at Temporary Version of PageFileUsageMonitor
     
  17. CatFan432

    CatFan432 Registered Member

    Joined:
    Nov 1, 2006
    Posts:
    333
    Location:
    Topeka, KS, US
  18. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Good.

    In addition to reducing subscripting, I added code that should catch certain types of errors.

    It seems that Win32_PageFileUsage and Win32_pageFileSetting operate differently in return info on the pagefiles. Note that Win32_PageFileUsage as an additional property in Win XP, not in Win 2000.

    In a few minutes, I'll replace version 2.0.0.0 with an updated version 2.0.0.1.
     
  19. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Temporary version has been deleted.
    A new version has been placed at PageFileUsageMonitor.

    Also modified the document to state that the WMI service must be Started with a Startup Type of Automatic.
     
  20. ruinebabine

    ruinebabine Registered Member

    Joined:
    Aug 6, 2007
    Posts:
    1,096
    Location:
    QC
    I simply unzipped it over 2.0.0.0 and guess what...

    PFUM_v2001.png

    Good job, Howard.
    The bad news: no more nuts from me,
    for now!
    :)
     
    Last edited: Apr 14, 2009
  21. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Thanx, I'll sleep better tonight.

    I intend to change the program to test whether WMI is installed.

    I'll post here to let folkes know when that is done.
     
  22. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Just released version 2.0.0.2.
    It should detect whether the WinMgt service is installed.
    If WinMgt is installed, the program should automatically start WMI even if you have WinMgt STOPped.
     
  23. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Previous post should have said:

     
  24. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    I believe that version 2.0.0.2 requires Administrator to run.
    I'l post a less restricted version soon.
     
  25. Howard Kaikow

    Howard Kaikow Registered Member

    Joined:
    Apr 10, 2005
    Posts:
    2,802
    Version 2.0.0.3 has been posted.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.