General: Understanding Memory - Measuring Memory Utilization
0 Comments Published by Hs on Sunday, May 6, 2007 at 11:28 PM.Available Bytes is an instantaneous counter that measures real memory allocation, and is the single most important measure of memory utilization available in Windows. The Available Bytes counter reports the current size of the Standby, Free, and Zero lists. The Standby list contains pages recently trimmed from executing process working sets. New pages that processes requests are created from the Zero list of aged pages, or, if the Zero list is empty, from the Free list.
The current number of Available Bytes is fundamentally a measure of memory occupancy. By implication, it reports on how much RAM is currently free:
Real memory allocated = Size of RAM – Available Bytes
However, as discussed previously, this is not always a safe assumption in Windows because there are some anomalies in the way memory allocations are accounted for. A good configuration rule of thumb is to maintain a buffer of Available Bytes equal to approximately 5 – 10% of total RAM. Maintaining an ample supply of Available Bytes is necessary so those page faults can always be resolved quickly.
It is also important to monitor the number of Available Bytes against two thresholds that trigger a change in the Windows page replacement policy. At approximately 4MB of Available Bytes, process working sets are no longer allowed to expand above their current maximum values. Any system running consistently at or near 4MB of Available Bytes is real memory-constrained to some degree. If you are monitoring your critical application and file servers on a minute-by-minute basis, for example, the percentage of time that Available Bytes measure 4MB +/- 20% is a worthwhile metric to track. A system that occasionally runs at or near 4MB if Available Bytes (> 40% of the time) is probably suffering from a real-memory constraint.
Windows has a second Available Bytes threshold value that alters the page replacement policy. When Available Bytes reaches about 1MB, pages below the process working set minimum are no longer exempt from page trimming. Any system running at or below 1MB even occasionally (>10% of the time) is dangerously memory-constrained.
Even though Available Bytes is the single most important metric concerned with memory and paging, you should not be content to monitor it in isolation. Because it directly impacts thread execution time, it is also important to monitor the hard page fault rate (the Page Reads/sec counter) in tandem. In fact, the reason to look at the demand paging. As ling as process working sets are allowed to grow, processes that need more memory will be able to acquire those resources. However, at or below the 4MB threshold, working set growth is constrained and some processes may feel the shortage. When memory is constrained, we can expect to see more demand paging.
The above was extracted from the book, Windows 2000 Performance Guide by Mark Friedman & Odysseas Pentakalos.
Labels: available bytes, free list, memory, pages, process working set, standby, virtual memory, zero list





0 Responses to “General: Understanding Memory - Measuring Memory Utilization”
Post a Comment