If my pagefile is disabled on Windows, should I still be seeing Hard Faults?

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

Posted 2014-01-22T20:51:18.663

Reputation: 361

2Jason: You don't understand virtual memory. – Jamie Hanrahan – 2014-12-11T12:13:59.457

@JamieHanrahan You're right. I really didn't understand this at the time. I've left this for posterity's sake. – Jesan Fafon – 2014-12-11T15:59:07.360

3Why do you have pagefile disabled? – Jon – 2014-01-22T20:52:30.667

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 – 2014-01-22T20:54:40.120

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 – 2014-01-23T00:44:39.843

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 – 2014-01-23T05:15:45.023

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 – 2014-01-23T17:09:40.720

I will post the perfmon trace. – Jesan Fafon – 2014-01-23T17:11:17.570

Answers

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

Posted 2014-01-22T20:51:18.663

Reputation: 23 855

This is correct. And that article you linked is a very good primer on the subject. I usually refer people to it too. – Tonny – 2014-01-23T22:14:24.117

1So 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 – 2014-01-23T23:19:06.313

2I 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 – 2014-01-24T00:19:59.350