Many page faults in a 32-bit program running under WOW64

Discussion in 'Windows 64bit' started by mterrisse, Aug 5, 2010.

  1. mterrisse

    mterrisse Guest

    Hello,

    I am using Windows 7 64-bit but I develop a 32-bit application. When
    It is running, the Windows task manager reports millions of page
    faults and I am trying to track them to improve performance.
    The number of page faults reported for the same program using a 32-bit
    version of Windows is not so big, so it has to do with WOW64.

    I try to focus on faults directly linked to my code but most of the
    page faults come from Windows Api like ReadFile or SysAllocStringLen,
    and I cannot change anything to that.
    Is it well known that Win32 APIs can generate a lot of page faults, or
    is there anything I can do to limit that ?

    Note that I have 16 GB RAM installed on the machine, that is large,
    and a test program I wrote can generate thousands of pages faults
    immediately while it comsumes less than 1 MB.

    Regards,

    Michel
    mterrisse, Aug 5, 2010
    #1
    1. Advertising

  2. mterrisse

    Lorne Guest

    "mterrisse" <> wrote in message
    news:...
    > Hello,
    >
    > I am using Windows 7 64-bit but I develop a 32-bit application. When
    > It is running, the Windows task manager reports millions of page
    > faults and I am trying to track them to improve performance.
    > The number of page faults reported for the same program using a 32-bit
    > version of Windows is not so big, so it has to do with WOW64.
    >
    > I try to focus on faults directly linked to my code but most of the
    > page faults come from Windows Api like ReadFile or SysAllocStringLen,
    > and I cannot change anything to that.
    > Is it well known that Win32 APIs can generate a lot of page faults, or
    > is there anything I can do to limit that ?
    >
    > Note that I have 16 GB RAM installed on the machine, that is large,
    > and a test program I wrote can generate thousands of pages faults
    > immediately while it comsumes less than 1 MB.
    >
    > Regards,
    >
    > Michel


    Are you sure these are real faults? Every time your program asks windows to
    look for some data and it is not already in RAM it will load it and the
    failure to find it first time is recorded as a fault. The first time you
    program executes anything or during its startup my guess is that it will
    throw many page faults which are just related to data being loaded into RAM.
    I just looked on my machine and even Microsoft software like Outlook is
    showing over 50,000 "page faults".
    Lorne, Aug 5, 2010
    #2
    1. Advertising

  3. mterrisse

    mterrisse Guest

    > Are you sure these are real faults?
    I don't know what you call "real faults". Page faults here are not
    invalid page faults or protection faults. The process runs with no
    error.

    > Those page faults are due to data not already in memory but
    > Every time your program asks windows to
    > look for some data and it is not already in RAM it will load it and the
    > failure to find it first time is recorded as a fault.  The first time you
    > program executes anything or during its startup my guess is that it will
    > throw many page faults which are just related to data being loaded into RAM.
    > I just looked on my machine and even Microsoft software like Outlook is
    > showing over 50,000 "page faults"

    I understand that. What I can't understand is how a small program
    (code : ~ 300 KB, memory usage : ~ 500 KB) can generate millions of
    such page faults in a few seconds. The number of page faults is far
    greater than the number of bytes consumed by the process, this means
    that data is being loaded into RAM not only the first time it needs to
    access a page, but thousands of times for the same page. Strange.
    And this does not happen with the 32-bit version of Windows 7.

    Michel
    mterrisse, Aug 11, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PC Stop-N-Shop

    explorer causes invalid page faults in kernel32.dll

    PC Stop-N-Shop, Jul 13, 2003, in forum: Computer Support
    Replies:
    0
    Views:
    670
    PC Stop-N-Shop
    Jul 13, 2003
  2. amy bush

    IE Invalid Page Faults

    amy bush, Oct 5, 2003, in forum: Computer Support
    Replies:
    3
    Views:
    620
    °Mike°
    Oct 8, 2003
  3. Guest
    Replies:
    9
    Views:
    851
    Guest
    Aug 6, 2009
  4. Michael
    Replies:
    2
    Views:
    2,809
    Michael
    Aug 14, 2009
  5. iwhitman2055

    TSKILL not TSKILLing under WOW64

    iwhitman2055, Dec 11, 2009, in forum: Windows 64bit
    Replies:
    2
    Views:
    2,606
    Charlie Russel - MVP
    Dec 12, 2009
Loading...

Share This Page