|< Day Day Up >|| |
Memory usage is usually the first item to look at when experiencing performance problems. If you find that your system is paging frequently, you probably need more memory. Some paging is expected to expand memory, but too much paging is a drain on system performance.
Paging is used to free memory for other uses by moving fixed-size blocks of data and code from RAM to your disk in units called pages.
Before monitoring memory usage, perform a few checks. For example, verify that your system has the recommended amount of memory for running the operating system as well as other applications and services. If you don’t know what the memory requirements are for a process, you can discover its working set within System Monitor. Shut the process down and observe the effect on paging activity. The amount of memory that is freed when you terminate a process is the amount of memory the process was using.
A working set is the portion of physical memory allocated to each program running on the computer.
To check for possible memory leaks or bottlenecks, monitor these counters:
Memory\ Pages/Sec Displays the number of pages written to or read from disk to resolve hard page faults. A hard page fault occurs when a process requires code or data that must be retrieved from disk rather than from its working set or elsewhere in physical memory. If this value is above 20 per pagefile, you need to research paging activity and make adjustments as necessary. A high value for this counter might be more indicative of a paging problem than a memory problem.
Memory\ Committed Bytes Displays the number of committed bytes of virtual memory on your system and is an instantaneous counter. Monitor this counter, along with Memory\ Available Bytes, over a period of time if you suspect a memory leak.
Memory\ Pool Nonpaged Bytes Displays the number of bytes allocated to the nonpaged pool for objects that cannot be written to disk but must instead remain in physical memory as long as they are allocated. If this value is high, you need additional memory on your system. Use this counter in conjunction with Memory\ Pool Nonpaged Allocs if you suspect that a kernel-mode process is the cause of a memory leak.
Memory\ Pool Nonpaged Allocs Shows the number of calls to allocated space in the nonpaged pool. Use this counter in conjunction with Memory\ Pool Nonpaged Bytes to determine whether you have a memory leak.
Server\ Bytes Total/Sec Monitors the number of bytes the machine has received from and sent to the network. The value is indicative of how busy the server is. You need to add memory if you have a sustained, dramatic increase in this value.
Server\ Pool Paged Bytes Monitors the number of bytes of pageable computer memory currently in use by the system. Use this information to determine values for the MaxPagedMemoryUsage entry in the Windows registry.
Server\ Pool Nonpaged Bytes Monitors the number of bytes of non-pageable computer memory in use by the system. Use this information to determine the values for the MaxNonpagedMemoryUsage entry in the Windows registry.
To monitor for a low memory condition, use these counters:
Memory\ Available Bytes When free bytes fall into short supply (4 MB or fewer), the shortage is replenished by taking memory from the working sets of less active programs. As a result, you see an increase in the working set value for one program and a steady decrease in the values of other programs, causing an increase in paging that causes performance to suffer. You’ll need to add memory to solve the problem.
Memory\ Cache Bytes Monitors the number of bytes being used by the file system cache. Use this counter in conjunction with Memory\ Available Bytes.
PhysicalDisk\ % Disk Time and PhysicalDisk\ Avg. Disk Queue Length Indicates a memory shortage when used in conjunction with Memory\ Page Read/Sec. If an increase in queue length is not accompanied by a decrease in the Memory\ Page Read/Sec value, a shortage does exist.
To check for excessive paging, monitor these counters:
Paging File\ % Usage (all instances) Paging files are shared by every process and are used to store pages of memory on your system. If you suspect that paging is to blame for your bottleneck, it is helpful to review this value, along with Memory\ Available Bytes and Memory\ Pages/Sec. The acceptable threshold for this value is 99 percent. Enlarge Pagefile.sys if the value increases to 100 percent.
Paging File\ % Usage Peak If the value for this counter approaches the maximum paging file setting, the size of Pagefile.sys needs to be increased.
PhysicalDisk\ Avg. Disk Sec/Transfer and Memory\ Pages/Sec The PhysicalDisk\ Avg. Disk Sec/Transfer counter displays the average disk transfer in seconds. The Memory\ Pages/Sec counter displays the number of pages written to or read from the disk when a process requires information that is no longer in its working set and must be retrieved from disk. To determine whether the system is paging excessively, multiply the values of these two counters. If the result exceeds 0.1, paging is taking up more than 10 percent of disk access time. If this condition persists over a period of time, you need additional memory.
Tips for Memory Troubleshooting
If you are experiencing problems with memory, try checking these areas:
Paging file Verify that the paging file is the correct size. You can also split the paging file between multiple physically separate disks (not multiple volumes on the same physical disk) of similar speeds to increase access time.
When the paging file reaches the maximum limit assigned to it, a warning is displayed and the limit is increased. Programs might become unstable while the limit is increased, and the system might crash if there isn’t enough disk space for additional virtual memory.
Physical memory Increase the physical memory above the required minimum.
Memory settings Confirm that memory settings are configured properly.
Memory-intensive programs If possible, run memory-intensive programs when your system workload is lightest or on another server.
|< Day Day Up >|| |