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?

Thanks in advance.

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

-----Original Message-----
From: Dave Burns [mailto:xxxxx@speechworks.com]
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?

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

> 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