1

Possible Duplicate:
In winxp, I have 4GB of RAM, am using 1.77GB, but programs keep paging out to memory. Why?

I'm sitting at my computer right now with a couple of applications open. I have several hundred megs of RAM free and I recently rebooted. Even so, many applications are continuously writing to the page file (at least, the "page fault" counter keeps increasing in Task Manager).

Why do applications write to the page file when there's plenty of available memory?

2
  • 1
    Long story short: If Windows doesn't need instant access to anything, it will usually cache it on the pagefile - making more RAM free for the user, and not filling it with useless crap (e.g. Vista). – Breakthrough Sep 24 '09 at 11:39
  • The page fault counter might have nothing at all to do with the pagefile. Or even disk I/O at all. – Jamie Hanrahan Dec 21 '18 at 7:49
1

You should read Mark's excellent writing on Paging at
Pushing the Limits of Windows: Virtual Memory and related posts.
Very shortly: the pagefile system is not used as an overflow space for your RAM.

1

Think of the page file as a memory "helper". It's job is to support memory allocation by acting as a cache. Often times, the page file stores stuff that USED to be in memory and is only there for reference purposes / easy access.

The types of apps you have running and how they go about allocating memory and loading/unloading things also has bearing on how the page file gets used.

Also check out some interesting discussion on page files on one of Jeff's old posts:

Running XP with the pagefile disabled

1

From Page fault in wikipedia:

Hardware generates a page fault for page accesses where:

  • the page corresponding to the requested address is not loaded in memory.
  • the page corresponding to the memory address accessed is loaded, but its present status is not updated in hardware.

This means that one of the applications is busily loading data or code into memory through reference, as distinct from I/O disk operations.

Since you have oodles of free memory, this can't be program/data swap-in or out to the pagefile.

The only other explanation I can think of is that some program has created a Memory-mapped file and is now processing it. This operation maps a memory portion equal in size to the file, although the file stays on the disk until the program refers to this "memory" through a pointer.

Question: which program in task manager is generating all these page faults?

0

There are several misconceptions here, primarily due to inconsistent and misleading labels in Task Manager.

  1. Most of the memory labeled as "Available" in Task Manager is actually in use. You don't have nearly as much free memory as you think.
  2. What is labeled as "PF Usage" is NOT actual pagefile usage. It is really the commit charge. Actual pagefile usage will typically be much lower.
  3. Since the pagefile is used only to store rarely-used data the actual amount means little to performance.
  4. Paging is not exclusive to the pagefile. In most cases it will only be about 10%.

Interpreting Task Manager is not as simple as most people think. If you see something that appears to be make no sense you are probably misinterpreting it.

2
  • Re 1, everything that is labeled as "Available" is immediately available for assignment to some other use. It's true that in the meantime it is "In use" as a page cache (and with Vista and later a subset of that is repurposed for SuperFetch) but it is not "In use" in the sense of being part of a working set. i.e. the more recent display like Resource Monitor will not count it as "in use". – Jamie Hanrahan Jan 7 '19 at 2:31
  • And I would add 5. The "page fault" counter is not in any way a count of writes due to paging, or even of disk reads. It counts both hard page faults (those requiring disk reads) and soft faults (those resolved in-memory, such as to the aforementioned page cache). And of the hard faults, hard faults do not necessarily mean the pagefile is being read. Dozens or even hundreds of other files are commonly involved in paging. (You'll notice that hard faults don't go away even if you don't have a pagefile.) – Jamie Hanrahan Jan 7 '19 at 2:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.