Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Measuring paging performance

OSR_Community_UserOSR_Community_User Member Posts: 110,217
Two questions re measuring hard page faults on NT:

1) When a process incurs a hard page fault, how does NT account for the CPU
time spent paging? Is it charged to the process or to the System process
or...? I assume it's charged as kernel-cpu-time and not user-cpu?

2) I'm trying to establish some good rules of thumb for determining when my
NT systems will start to be throttled by paging. The old resource kit doc
says more than 5 hard faults/sec will hurt you but then they say their
measurements were done on a 486 and a disk subsystem of that era as well. I
think my systems will handle that rate by now but I know they don't handle
paging on the order of 180 or so faults/sec. I'd like to find where the line
is in-between. It should be different for different configurations so can
anyone point me to a benchmarking program that can give me some indication?

Thanks in advance.

db

Comments

  • Paul_BunnPaul_Bunn Member Posts: 251
    There's very little CPU time taken in response to a page-fault -- the thread
    is put in an efficient wait state until the I/O required by the system to
    satisfy the page-in request can be satisfied. That's not to say that there
    isn't quite a bit of overhead in processing a page-fault, but compared to
    (say) 5-10ms waiting for an I/O operation to complete the request, it is
    trivial.

    Regards,

    Paul Bunn, UltraBac.com, 425-644-6000
    Microsoft MVP - WindowsNT/2000
    http://www.ultrabac.com


    -----Original Message-----
    From: Dave Burns [mailto:[email protected]]
    Sent: Monday, June 12, 2000 2:34 PM
    To: NT Developers Interest List
    Subject: [ntdev] Measuring paging performance


    Two questions re measuring hard page faults on NT:

    1) When a process incurs a hard page fault, how does NT account for the CPU
    time spent paging? Is it charged to the process or to the System process
    or...? I assume it's charged as kernel-cpu-time and not user-cpu?

    2) I'm trying to establish some good rules of thumb for determining when my
    NT systems will start to be throttled by paging. The old resource kit doc
    says more than 5 hard faults/sec will hurt you but then they say their
    measurements were done on a 486 and a disk subsystem of that era as well. I
    think my systems will handle that rate by now but I know they don't handle
    paging on the order of 180 or so faults/sec. I'd like to find where the line
    is in-between. It should be different for different configurations so can
    anyone point me to a benchmarking program that can give me some indication?
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    That makes sense to me but then I'm trying to understand the behavior I'm
    seeing. When I watch a certain process in the performance monitor, I see
    that it incurs about 180 faults/sec. When I overlay graphs of that process's
    user CPU and kernel CPU, they are perfectly correlated with the paging
    spikes. There's almost a 50/50 spit between user and kernel times. For a few
    page faults, the processing time could be trivial as you say but what about
    a machine that's thrashing? I have 512MB of RAM and a process that takes up
    about 1GB of virtual memory. The process's working set sits at about 480MB
    (for various reasons, I can't increase the amount of RAM in the machine). I
    do believe that paging is throttling my dual CPUs, both of which sit at
    about 7% utilization for what is normally a compute-bound process. What I
    need is a smoking gun. Any ideas?

    db


    ----------------------------------------------------

    There's very little CPU time taken in response to a page-fault -- the thread
    is put in an efficient wait state until the I/O required by the system to
    satisfy the page-in request can be satisfied. That's not to say that there
    isn't quite a bit of overhead in processing a page-fault, but compared to
    (say) 5-10ms waiting for an I/O operation to complete the request, it is
    trivial.

    Regards,

    Paul Bunn, UltraBac.com, 425-644-6000
    Microsoft MVP - WindowsNT/2000
    http://www.ultrabac.com
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    > Two questions re measuring hard page faults on NT:
    >
    > 1) When a process incurs a hard page fault, how does NT account for the
    CPU
    > time spent paging? Is it charged to the process or to the System process
    > or...? I assume it's charged as kernel-cpu-time and not user-cpu?

    AFAIK NT accounts the CPU time for a process using a timer interrupt.
    So, if the timer interrupt interrupts the MmAccessFault and friends - the
    faulting process is charged (its kernel time increases).
    System process has nothing to do with it.
    Surely, the process does not consumes the CPU time waiting for
    IoPageRead to complete.

    Max
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 26 Feb - 1 Mar 2024 Live, Online