2

I am running Windows 7 with 32GB of RAM and have disabled my PageFile.

However, in Resource Monitor, the Memory tab is still showing values for Hard Faults/sec. I've read that this metric should display how many times per second a program is being read out of the PageFile on disk.

Given that I have mine disabled (and have rebooted), why am I still seeing non-zero values for this metric? Also, might this graph include Soft Faults too?

Screenshot of zero page file and still seeing hard faults / sec

Jesan Fafon
  • 391
  • 3
  • 11
  • 3
    Why do you have pagefile disabled? – Jon Jan 22 '14 at 20:52
  • I have 32GB of physical RAM installed and my hard drive is as slow as molasses after a cold winter's day in Wisconsin. I'd rather take my system down if I push past 32GB than make it become unresponsive. In other words, personal preference :P – Jesan Fafon Jan 22 '14 at 20:54
  • It could count new allocations as a hard fault but I don't know for sure. Can you run `perfmon` and create a trace that contains all of the possible memory traces and post that? – Scott Chamberlain Jan 23 '14 at 00:44
  • pagefault has nothing to do with pagefile. It means the system needs data that it must read from disk because the data are not already in the RAM. – magicandre1981 Jan 23 '14 at 05:15
  • The label on the graph is not `PageFault` but `HardFault`. Also, a `PageFault` would not count fresh reads from disk because that data was not already in virtual memory. In a `PageFile` free system, the only way you should be able to generate a `PageFault` (as I understand virtual memory) is by reading data from existing memory cache. There should also be 0 `Hard Faults`. – Jesan Fafon Jan 23 '14 at 17:09
  • I will post the `perfmon` trace. – Jesan Fafon Jan 23 '14 at 17:11
  • 2
    Jason: You don't understand virtual memory. – Jamie Hanrahan Dec 11 '14 at 12:13
  • @JamieHanrahan You're right. I really didn't understand this at the time. I've left this for posterity's sake. – Jesan Fafon Dec 11 '14 at 15:59

1 Answers1

4

I've read that this metric should display how many times per second a program is being read out of the PageFile on disk.

Then you've clearly read some bogus rubbish. It's quite wrong to think that in a demand-paged operating system the only possible backing store for memory pages is the system page file. Program image files containing the code and (read-only/untainted) data for running programs are another possibility. Then there are explicitly memory mapped files.

Further reading

JdeBP
  • 26,613
  • 1
  • 72
  • 103
  • This is correct. And that article you linked is a very good primer on the subject. I usually refer people to it too. – Tonny Jan 23 '14 at 22:14
  • 1
    So `Hard Faults` apply to more than disk reads? I was under the understanding that Microsoft made a specific disambiguation between `Page Faults` and `Hard Faults` where the `Hard` in `Hard Faults` is the same hard in hard drive. Also, of course I don't think the only backing store is the page file. I think it is virtual memory and I was under the understanding that the `Hard Faults` metric ignored "non-slow" PageFault (virtual memory) locations. – Jesan Fafon Jan 23 '14 at 23:19
  • 2
    I do wonder where on Earth you are reading all of this bogus rubbish. You need to find, or if one doesn't exist add, a "What is meant by 'Hard Faults' in Windows' Resource Monitor?" question. Because almost none of what you just wrote was right. – JdeBP Jan 24 '14 at 00:19