Thread: Whats the deal with page faults?

  1. #1
    Registered User
    Join Date
    May 2005

    Whats the deal with page faults?

    Just wondering whats the deal with these page faults..

    Just compiled/build my little directx program and ran it through the PIX program that shipped with DirectX SDK to check CPU/GPU usage and to make sure my program was running at a fixed rate of 60FPS...

    well I noticed my program is averaging anywhere from 170-400 page faults per second.. isn't this a lot? sounds like alot...

    All I have really is a simple program that loads in a texture.. parses it to create a sprite... and then moves the sprite sequence to the screen (moving up or down if i tell it to) Is this page fault count normal?

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Well right off the bat it doesn't sound good. Post some code and we might be able to sort it out.

    Perhaps you are over-running the bounds of your texture array for the sprite.

  3. #3
    Registered User
    Join Date
    Apr 2002
    Why don't you run some DirectX SDK samples through PIX and see what their page faults look like.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  4. #4
    Registered User
    Join Date
    May 2005
    Hmm... always overlook the simplest solution.

    If I could just take MrWizard's brain and stick it in my head I'd be golden.

    Yep the samples produce around the same madness... the idea of that many pagefaults per second seems nightmarish, but I guess its normal...

    was about to post my code... but I guess its no longer needed..

    who woulda thunk it... a few hundred page faults per second = good
    Last edited by Deo; 06-10-2005 at 12:20 PM.

  5. #5
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    A page fault occurs when a memory access maps to a page which is not in memory, that in tern causes that page to be loaded. Seeing many page faults at first should be ok, but you'd think it would decrease after things get running.

  6. #6
    Registered User
    Join Date
    May 2005
    Yep, thats what I don't get... it seems to be a steady rate and a very high rate at that... I mean what page could it possible be looking for? Why are the pages its looking for not in memory? Sure the first time through i'm obviously gonna get a pauge fault but after that why.... I got tons of memory to spare here so thats not an issue.. so whats going on behind the scenes I wonder.

    My operating system class in school is contradicting these numbers..

    Oh well.. just some thought.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A huge page faults problem
    By g4j31a5 in forum C++ Programming
    Replies: 12
    Last Post: 10-22-2008, 03:42 AM
  2. why page based I/O can improve performance?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 06-12-2006, 07:42 AM
  3. virtual memory
    By sweets in forum C Programming
    Replies: 6
    Last Post: 11-06-2004, 06:55 AM
  4. Invalid Page Faults with Command Line Args
    By KneeLess in forum C++ Programming
    Replies: 5
    Last Post: 09-29-2003, 05:40 AM
  5. C Graphics - Page Flipping
    By z0diac in forum C Programming
    Replies: 1
    Last Post: 10-29-2002, 01:21 AM