High page faults/sec and cache faults/sec in asp.net application

11,171

Solution 1

The underlying problem was due to a lot of strings that the GC had to handle.

For example we had quite a lot of string conversions from the data layer datareader["column"].ToString()

this was replaced to

(string) datareader["column"].Tostring() and it helped quite a lot.

Another problem was also that we were caching a lot of same strings in asp.net cache. We optimized this to only cache the reference to a list where the string is only stored once. We also optimized the caching so that we cache things that will be reused on all machines in the .net cache and things that will only be reused but not maybe on the same server this we cached serialized on another server, which therefore does not keep a reference and therefore will free up so GC can free up the memory.

Solution 2

If you are talking about asp.net page faults, then look in the windows server logs, as well as any logs you may have to determine what's going on. You should see a LOT of .net errors.

If you are talking about MEMORY page faults and cache faults, then this could be normal behaviour. Memory page faults are common and are basically a signal in the hardware to shift data from virtual memory to physical memory. See http://en.wikipedia.org/wiki/Page_fault

The best way to lower Memory page faults is to increase the amount of physical RAM available in the machine.

You might also want to read: http://blogs.technet.com/b/askperf/archive/2008/06/10/the-basics-of-page-faults.aspx

Share:
11,171
Patrik
Author by

Patrik

Updated on June 04, 2022

Comments

  • Patrik
    Patrik about 2 years

    What could be causing very high values on the counters page faults/sec and cache faults/sec?

    The counter pages/sec is nearly zero. Around zero, and occasionally bumps up to 300 for just a second. Avarage of about 10 (over time).

    The cache faults/sec is zero for 2-e seconds and then raise to about 10000 for 2-3 seconds. And this is repeated all the time.

    page reads/sec is low about 0-20.

    The page faults/sec is avarage of 25000 and occasionally bumps up to 80000.

    Where in the web application should I start looking?

  • Patrik
    Patrik about 13 years
    I am talking about memory page faults. We have about 7 GB of free RAM in the machine. We had an update of the web application and it was after that the page faults became high. So I need input on where to start looking.