Does anyone know why Process Explorer might show these weird values for memory usage of my Virtual Box instance?

Here are the real numbers:

vmmap

But here's what Process Explorer is showing:

alt text

alt text

So the process has committed 1.2 GB of VM, 1.1 GB of which is private. But Process Explorer is only seeing 196 MB of VM, and only 48 MB of private memory! What's going on here?

EDIT: This memory is not just reserved. It actually gets used:

alt text

link|improve this question

77% accept rate
As the chance is high that this is a bug, and these two tools are by Sysinternals... You might want to inform them with a similar description at their forum: forum.sysinternals.com – Tom Wijsman Sep 6 '10 at 17:09
Does it display correctly in Task Manager? – Connor W Sep 6 '10 at 18:04
@Connor Task Manager shows the same numbers as Process Explorer. – romkyns Sep 16 '10 at 14:01
feedback

3 Answers

up vote 2 down vote accepted

Mark Russinovich has kindly explained that this occurs because VirtualBox locks a large amount of memory, which requests the OS to keep it in the working set.

Locked memory isn't included into any of the counters used by Process Explorer or Task Manager for some reason, so these tools display numbers that are significantly off in this case (and I wonder in how many other cases...)

Mark didn't suggest why locked memory isn't counted by PrivateBytes or WorkingSet, but I theorise that it might be historical: this 1993 article states that processes can only lock up to 32 pages (which is 128 KB on a typical modern machine). This is clearly no longer true, but perhaps the memory is not counted because it used to be a fairly small amount. This is pure speculation on my part though.

link|improve this answer
I guess locking memory is for exceptional purposes only, together with the reason stated in that article is probably the reason why it never got counted... Nice that you figured it out that far, and yeah... Mark Russinovich is the man for such answers when the Sysinternals Forum can't help you out. :-) – Tom Wijsman Sep 17 '10 at 20:07
feedback

VMMap might have a bug that makes Committed include discarded pages or pages in the swap file.

Thus now it looks like inactive memory... It's allocated just as a reserve (or as a bug).

The Working Set only contains active memory, VMMap and Process Explorer do show the same WS...

link|improve this answer
It does indeed appear that VMMap has absolutely nothing anywhere to count reserved memory. I didn't notice that before. Ironic how Mark bashes Task Manager for using inconsistent terminology and then himself counting reserved memory together with committed memory... – romkyns Sep 6 '10 at 21:32
Yeah, the names should be made more consistent across products... – Tom Wijsman Sep 7 '10 at 1:14
OK, it's not this. When I start the VM, ProcessExplorer shows an overall increase in Commit by 1.1 GB or so, and the Physical usage also goes up by 1.1 GB. But not a single counter on the new process has those kinds of numbers. – romkyns Sep 7 '10 at 8:02
My guess is that the memory is allocated by a driver instead of the VM process. Another reason could be due to the hardware acceleration and nested paging options that VM software has, that causes Windows to be unable to see where that memory went... – Tom Wijsman Sep 7 '10 at 11:51
Turns out that this memory isn't counted because it is locked into the working set. That doesn't actually explain why it's not reported in the working set counter, but that's another question. Posted my own answer... – romkyns Sep 17 '10 at 18:47
feedback

From RAM, Virtual Memory, Pagefile and all that stuff :

Memory, Committed Bytes: This is a measure of the demand for virtual memory. It shows how many bytes have been allocated by processes and to which the operating system has committed a RAM page frame or a page slot in the pagefile (or both). As Committed Bytes grows above the available RAM, paging increases, and the amount of the pagefile in use also increases. At some point, paging activity starts to significantly affect perceived performance.

So I do believe that the Committed Bytes amount has nothing to do with VirtualBox - it's just the sum-total of physical RAM pages of all running processes in the system. In that case, the data returned by Process Explorer is correct.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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