Making sure you have enough memory

Memory usage is perhaps the most important factor in system performance. One of the ways you may become aware of a memory shortage is if your system is paging frequently. Paging is the process of moving fixed size blocks of code and data from RAM to disk using units called pages in order to free memory for other uses. Although some paging is acceptable because it enables to use more memory than actually exists, constant paging is a drain on system performance. Reducing paging will significantly improve system responsiveness.

This section describes how you can determine whether your system has an adequate amount of memory and an appropriate configuration for its role, plus how to begin to analyze its paging activity. (Further discussion of paging and related factors appears in Checking for excessive paging)

Checking your configuration

Before beginning to monitor memory usage on your computer in detail, verify that your computer is properly equipped and configured:


Make sure your system has the recommended amount of memory not only for running but also for the programs or services you are running. Check the amount of memory on your system against requirements of the operating system and your programs. Consult product documentation for programs or services that you are running to verify that memory is adequate.

To see the amount of system memory, see To determine the amount of RAM on your computer To estimate your memory requirements, start with the memory required for the operating system and add the following factors:

Number of users multiplied by the average size of the open data files per user

Number of programs run on the server computer multiplied by the average size of programs run on the server

If you are uncertain about the memory requirements of a process that you are running, you can note its working set in System Monitor, shut it down, and observe the corresponding effect on paging activity on your computer. The amount of memory freed by terminating programs is the amount of additional physical RAM needed on the system.


Check that system settings are appropriate based on how you use your computer. When you install Server, Setup configures your computer with settings that optimize it for file sharing. However, in some cases, that configuration can cause excessive paging on your computer because it causes the system to maintain a large system-cache working set. If you are not using the server for file sharing or for other programs that specifically require this setting to be enabled, you can turn it off to reduce the amount of paging.

To change these settings, see To configure memory-related settings on your computer

Monitoring memory counters

To monitor for a low-memory condition, start with the following object counters:

Memory\Available Bytes


Available Bytes indicates how many bytes of memory are currently available for use by processes. Pages/sec provides the number of pages that were either retrieved from disk due to hard page faults or written to disk to free space in the working set due to page faults.

Low values for Available Bytes (4 MB or less) may indicate there is an overall shortage of memory on your computer or that a program is not releasing memory. If the value of Pages/sec is 20 or more, you should research the paging activity further. A high rate for Pages/sec may not indicate a memory problem but may instead be the result of running a program that uses a memory-mapped file.

You must monitor Available Bytes along with Pages/sec and Paging File % Usage to determine whether this is the case. If you are reading a noncached memory-mapped file, you should also see normal or low cache activity. For more information, see Checking for excessive paging 

If you suspect a memory leak, monitor Memory\Available Bytes and Memory\Committed Bytes to observe memory behavior and monitor Process\Private Bytes, Process\Working Set, and Process\Handle Count for processes you think may be leaking memory. Also monitor Memory\Pool Nonpaged Bytes, Memory\Pool Nonpaged Allocs, and Process(process_name)\Pool Nonpaged Bytes if you suspect that a kernel-mode process is causing the leak.

Checking for excessive paging

Because excessive paging can make substantial use of the hard disk, it is possible to confuse a memory shortage that causes paging with a disk bottleneck that results in paging. As a result, when you investigate the causes of paging, where a memory shortage is not apparent, make sure to track disk usage counters such as the following along with memory counters:

Logical Disk\% Disk Time

Physical Disk\Avg. Disk Queue Length

For example, include Page Reads/sec with % Disk Time and Avg. Disk Queue Length. If a low rate of page-read operations coincides with high values for % Disk Time and Avg. Disk Queue Length, there could be a disk bottleneck. However, if an increase in queue length is not accompanied by a decrease in the pages-read rate, then a memory shortage exists.

To determine the impact of excessive paging on disk activity, multiply the values of the Physical Disk\Avg. Disk sec/Transfer and Memory\Pages/sec counters. If the product of these counters exceeds 0.1, paging is taking more than 10 percent of disk access time. If this occurs over a long period, you probably need more memory.

Investigating program activity

Next, check for excessive paging due to programs that are running. If possible, stop the program with the highest working set value and see whether that dramatically changes the paging rate. If you suspect excessive paging, check the Memory\Pages/sec counter. This counter shows the number of pages that needed to be read from disk because they were not in physical memory. (Notice the difference between this counter and Page Faults/sec, which indicates only that data was not immediately available in the specified working set in memory.)

Checking the paging file size

You have some options for how to manage your paging file for better performance:

You can place a paging file on other disk drives. If you have multiple hard disks, splitting up the paging file is a good idea because it will speed up the access time. If you have two hard disks and you split the paging file, both hard disks can be accessing information simultaneously, greatly increasing the throughput. However, if you have two hard disks and one hard disk is faster than the other, it may be more effective to store the paging file only on the faster hard disk. You may need to experiment to arrive at the best configuration for your system.

You can increase the size of the paging file. When you start , it automatically creates a paging file (Pagefile.sys) on the disk where you installed the operating system. uses the paging file to provide virtual memory. The recommended size for the paging file is equivalent to 1.5 times the amount of RAM available on your system. However, the size of the file also depends on the amount of free space available on your hard disk when the file is created. You can find out how large your system's paging file is by looking at the file size shown for Pagefile.sys in Windows Explorer.

Assuming you are not already short of disk space, you can increase the size of the paging file. If your users tend to run several programs simultaneously, they might find that increasing the size of the paging file will enable programs to start faster.

Although you can reset both the initial and the maximum sizes for the paging file, it is more efficient to expand initial paging file size, rather than force the operating system to allocate more paging file space as programs start, which fragments the disk.

If the paging file reaches its maximum size, a warning is displayed and the system may halt. To see whether your paging file is approaching its upper limit before it reaches the upper limit, check the actual file size and compare it to the maximum paging file size setting in the System utility in Control Panel. If these two numbers are close in value, consider increasing initial paging file size or running fewer programs.

Paging file counters offer another way to see whether the size of the Pagefile.sys file is appropriate:

Paging File\% Usage

Paging File\% Usage Peak (bytes)

If the % Usage Peak value approaches the maximum paging file setting, or if % Usage nears 100 percent, consider increasing the initial file size.

If multiple paging files are spread across multiple disk drives, the path name of each file appears as an instance of the Paging File object type. You can either add a counter for each paging file or select the _Total instance to look at combined usage data for all your paging files.

© 2017 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies