Re: Still confused why working set larger than virtual memory

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks Ondrej,


Two more comments,

1.

Your described sample is interesting. Have you experienced any situations
when working set (counter in Perfmon) is larger than virtual memory (counter)?

2.

I think in your below case, you mentioned the file map pages are not counted
as part of the working set. How do you know that? Which tool/technique you
are using to check some specific page belongs to working set or not?


regards,
George

"Ondrej Spanel" wrote:

true, such RAM does not have related virtual memory address, how could the
current process utilize or even address (re-use to avoid hard page fault) it
in the future?

There is one special case with filemapping - you may have pages
allocated in a physical memory (be it RAM or page file), which have no
virtual address mapped. You can address such memory by creating a view
to it, use it, and then unmap again. To identify the location you use
the position in the file, and the memory is still committed even when
you do not have any virtual address mapped to it. Each time after you
map the view, you will get a soft page fault on first access, not the
hard one.

However, while this technique is definitely interesting, I never seen
such pages to be reported as a part of the working set (I am using
Process Explorer though, not PerfMon as you do).

(You might perhaps also find my reply to your older topic "File map
performance" of some interest)

Regards
Ondrej

.



Relevant Pages

  • Re: Fastcode MM memory usage
    ... For PerfMon it depends entirely on what you've chosen to monitor. ... Working Set is roughly the amount of RAM currently in use by the ... operating system to "trim the working set". ... system tosses memory pages that haven't been touched in a while. ...
    (borland.public.delphi.language.basm)
  • Re: Still confused why working set larger than virtual memory
    ... With the SysInternals Process Explorer the column is called Working Set. ... What you removed is exactly the "smart trick" to have memory "accessible", ... as you map views you never unmap. ... I attach my test source which I used for my file mapping measurements. ...
    (microsoft.public.vc.language)
  • Re: Binary data in multiple adjacent files
    ... Mapping it doesn't eat any working set except, possibly, for the ... It's not faulted into physical memory. ... You also get a whole "page fault cluster" faulted in. ... grid sections immediately north, south, northeast, northwest, southeast ...
    (comp.os.vms)
  • Re: Still confused why working set larger than virtual memory
    ... The next time I map the same part of the file, it still contains the same data I filled it before, demonstrating it resided somewhere (I also explained why I am sure they resided in the physical memory, not in the page file). ... This also exactly what Alexander Nickolov is talking about: even when you unmap your file views, the pages still may reside in the memory and may be a part of the working set. ... I am not freeing the memory, I am only unmapping its virtual addresses. ...
    (microsoft.public.vc.language)
  • Re: Still confused why working set larger than virtual memory
    ... > when working set is larger than virtual memory? ... > I think in your below case, you mentioned the file map pages are not counted ... I can see very little memory reported as a working set ... I suppose file pages which are currently mapped into a view are counted as a part of both the working set and used virtual memory, however I did not perform any experiments in this sense. ...
    (microsoft.public.vc.language)