On our Windows 2008 R2 64 bit servers there seems to be a discrepancy between the number shown in Task Manager on the Performance tab in the Memory Graph and the sum of the Memory (Private Working Set) on the Processes tab. The former is consistently higher. The discrepancy does not seem to depend on the amount of memory allocated to the box or on the number of processes on the box. For the four servers I have examined the discrepancy ranged from 853 MB to 4,178 MB. Can someone please explain this?
In addition to process private working sets, there are many other types of memory that contribute to the total memory usage, such as kernel allocations, pages mapped into the system cache working set, pages on the modified list etc. You can use RamMap.exe (http://technet.microsoft.com/en-us/sysinternals/ff700229.aspx) to get a more detailed picture of what's actually in memory.
The "memory" graph in Task Manager is the amount of total physical memory in your machine, minus the available physical memory.
The process working set counter also looks at physical memory - but shared DLLs which only use one physical memory location are counted toward the working set of each process that uses it - therefore, the working set overcounts memory.
If a process pages memory out to disk, this is not included in the working set counter, and can therefore cause the working set to undercount the amount of memory used.
Here is a listing of what all of the counters map to: http://msdn.microsoft.com/en-us/library/aa965225(VS.85).aspx
And here is a pretty good blog post that goes into some details: http://www.itwriting.com/dotnetmem.php