3

I've been watching an older episode of defrag tools, where Andrew Richards explains RAMMap (http://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-6-RAMMap)

At 24:45 he mentions that repurposing standby lists 5-7 indicates memory pressure on the system. In the comments of this show he confirms this to a user having a new laptop. I've also watched Mark Russinovich's Mysteries of Memory Management Revealed to get a better grip on that.

Standby is regarded as a cache, (on non-SSD Windows 7 installations SuperFetch is implicitly enabled, which uses standby list 6 and 7 to load data into the standby lists to have them ready)

Andrew even showed a priority summary of his machine (25:50), which was working for weeks, which had no repurposed memory in 5-7.

Contrary to this statement it seems that repurposing 5 is not necessary regarded a memory pressure issue. Some explanations of repurposing are here:

What are the "modified" and "standby" RAM regions in Resource Monitor?

Here is a screen from my win 7 x64, with 16 gb ram machine, running for 1.5 days, which had only firefox and remote desktop running.

Repurposed memory

6 and 7 are empty as SuperFetch is disabled.

Here is a machine of ours which did data processing (basically one application was running, chewing data)

data processing

Those 800 gb repurposed on 5 would indicate "a memory pressure" based on Andrew's explanation.

Based on this statement my local machine would need much more than the 16gb of ram and the data processor would need a "little" bit more. The processing involved writing many files, putting in 128gb of ram to it would probably not help here, even though the raw repurposed numbers say otherwise.

So does high repurposed memory on priority 5 indicate a real memory pressure or are there more metrics involved to rule other issues out?

I was able to write a small program, which is able to drive repurposing of priority 5 up: A for loop allocating 3/4 of ram and accessing it in at least two threads. But this is a synthesized situation as my machine from top did not feel as it had pressure. It run a virus scan that day and firefox and remote desktop were not eating my ram.

Obvious fact: If I alloc 3/4 of ram, use it, free it, re-alloc again etc, no standby list is re-purposed as freeing it goes to freed, then to zeroed list. I did not test this with file mappings though, which are much easier to be cached as arbitrary blocks of memory.

4
  • 1
    I don't see a question. Are you just looking for an explanation of the behavior?
    – Ramhound
    Jan 6, 2015 at 12:24
  • Sorry, I edited it to explicitly ask whether high repurpose of priority 5 is indeed memory pressure. I do not have enough knowledge to rule out whether sloppy programming could cause this behaviour too, where maxing out ram would simply not help.
    – Samuel
    Jan 6, 2015 at 12:45
  • I am not going to begin to attempt to answer this question. What I fear is your asking a question about a concept that only exists within a semi-official Microsoft tool and defined by a Microsoft employee in a video. You might have to wait while for somebody with enough knowledge to come around.
    – Ramhound
    Jan 6, 2015 at 12:53
  • superfetch uses page 5. 6 and 7 are only special ones, that are used for special scenarios. Jan 8, 2015 at 5:42

1 Answer 1

3

In my opinion, this claim about repurposing priority-5 standby RAM being necessarily a sign of memory pressure is overblown.

Now, tt is true that priority 5 is the default for interactive processes, and you would prefer to see lower-priority pages being repurposed than priority 5.

What, though, if there just isn't enough of it? On this system at the moment I have a total of 3.2 GB of priority 5 standby and at priority 0-4 a total of maybe 130 MB! (SuperFetch is turned off, btw, since I have an SSD for my OS disk.)

Also remember that these "repurposed" counters are cumulative since the boot. My system here has been up for almost a month, since March 12 - call it 27 days, about 2.3 million seconds. In that time I have apparently repurposed about 230 GB from the priority 5 list. Sounds like a lot! But repurposing is done a page at a time; a page is 4096 bytes, so that's only about 56 million pages. So as a long-term average I've been repurposing about 24 priority-5 pages per second. A "repurpose" takes a few tens of ns, so I think I can stand it.

Since most RAM on most desktop and laptop systems is being used by interactive processes, and most of the other processes are doing very little a lot of the time, it only makes sense that interactive processes will see a lot more repurposing than the rest.

Another factor is that while the "Repurposed" counters are cumulative from the boot, the "Standby" counters on that screen show only the at-the-moment sizes of those sub-lists. We don't know how much priority 4 standby there was as an average since boot, or what the highest peak was, or any such detail. Without this information the signifcance of the "repurposed" counter is pretty tough to evaluate.

In sum, I think the comment has some merit (in that repurposing of priority 5 standby is less desirable than at the lower levels), but a high number of "repurposings" at priority 5 is not necessarily reason to e.g. run out and buy more RAM.

edit-added: I have a couple of other issues with that video that collectively lead me to think that the speaker's understanding of these issues is somewhat incomplete - or perhaps he spoke without thinking about it too much. It happens.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .