views:

9

answers:

1

If you use GlobalMemoryStatusEx to get statistics, one is dwMemoryLoad which is the approximate percentage of physical memory in use. Is memory that SuperFetch has consumed added to dwMemoryLoad? I'm working on software which uses this statistic to manage its own caching, flushing cache when the percentage goes too high. I'm worried that SuperFetch causes false results.

Reading about SuperFetch, games users on Vista often say turning it off improves performance. That confirms my hypothesis that SuperFetch will cause an application to falsely believe more physical RAM is in use than is actually used by the apps being run.

Mark Russinovitch's Vista Kernel posting has a nice explanation of SuperFetch.

In an interesting example of where the original Task Manager is more informative than Sysinternals Process Explorer, Jeff Atwood has pictures of the Physical Memory usage with Superfetch in Task Manager.

alt text

Note the 6MB free Physical Memory!

I'm not just being lazy - all our 32bit test machines are running XP and I only have access to 64 bit Vista or Windows 7 machines, so I'd still like to hear from people as to how it affects 32 bit systems.

A: 

Tentatively, the answer is no it doesn't get included - the cached amount is accumulated separately.

I turned on SuperFetch on my Vista x64 machine (interesting to note it was off for some reason) and built the sample program in the GlobalMemoryStatusEx docs. At a time with little happening on my machine, the sample was reporting 50% of memory in use but the Windows task manager showed Physical Memory stats of:

  • Total 4093
  • Cached 2285
  • Free 92
Andy Dent