Troubleshooting Memory Issues - An Overview

The most common manifestation of memory issues is a memory shortage - essentially a situation with insufficient resources.  There are two types of memory pressure to consider - first, a system with too little physical RAM installed.  When a system has too little RAM, the Virtual Memory Manager has an increased workload as it attempts […]

The most common manifestation of memory issues is a memory shortage - essentially a situation with insufficient resources. 

There are two types of memory pressure to consider - first, a system with too little physical RAM installed.  When a system has too little RAM, the Virtual Memory Manager has an increased workload as it attempts to keep the most recently accessed virtual memory pages of processes in Physical RAM so that they can be quickly retrieved.  Performance of both applications, and the overall system may suffer as a result of the increased paging to disk.  Although the excessive paging is really a secondary symptom, it is the easiest symptom to detect.  The second type of memory issue occurs when a process exhausts the available virtual memory.  This is most commonly referred to as a memory leak.  Most memory leaks are fairly easy to detect and are usually caused by software code defects.  However, normal system workload can also cause a memory depletion - there is no real memory leak, however overall virtual memory usage continues to grow until the system experiences a shortage.

One of the problems with configuring and troubleshooting memory on a system is that the memory is not used in quite the same fashion as the other hardware on a system.  Program instructions and data occupy physical memory to execute.  Often, they will occupy physical memory locations long after they are actively addressed.  The idle code and data are removed from RAM only when new requests for physical memory addresses cannot be satisfied from existing free RAM.  Also, because of the manner in which virtual memory address space is mapped to physical memory on demand, RAM tends to appear fully utilized all the time.

So now that we understand some of the mechanisms and how issues may manifest, how do we go about troubleshooting?  The first thing to understand is whether the problem is due to insufficient physical memory that results in excessive paging.  However, remember that excessive paging may occur even if there is plenty of available memory - for example if an application is leaking memory.  As we've mentioned before, it is important to have a baseline of your system's performance to compare to any new performance data that you gather.  Below are some of the key performance counters - the descriptions are pulled directly from the counter descriptions in Performance Monitor on Windows Vista:

Full Article

Additional Resources:

Windows, Operating System, Windows OS, Memeory, Troubleshooting, Overview, Architecture, Performance, Memory Management, Microsoft, Knowledgebase