Monitor Windows Server System Memory and Pagefile Usage

The most important memory counter is Pages/sec which shows the number of pages read from or written to disk and thus is a  representation of the quantity of hard page faults which the system is experiencing. Microsoft has recommended upgrading the amount of memory if  Pages/sec value is consistently averaging over 5 pages per second. In reality, you will probably only begin noticing slower system performance when the value is consistently over 20 so you should be carefully watching this counter once it pushes over 10 pages per second.

The Pages/sec counter is can also be useful to determine if the system is thrashing (ie if the systems is experiencing more than 100pages per second). Thrashing should never be permitted to occur on a Windows Server2008 R2 system as the reliance on the disk to resolve memory faults dramatically affects how efficiently the system can cope with workloads.

 

A system will experience page faults when a process requires data or code that it is unable to find in its working set. A working set is the amount of memory committed to a certain process. When a process has to retrieve the data or code in another part of physical memory this is a Soft Fault, a Hard Fault is when a process  has to retrieve it from the disk subsystem. Modern systems can cope with a large number of soft faults without significant performance impairment, however, since a hard faults requires disk subsystem access this causes the process to wait a significant amount of time which will dramatically slow performance. The Memory section of the Resource Monitor in Performance Monitor includes columns which show working sets and hard faults.

The Page Faults/sec counter show both hard  and soft faults. This counter will often display rather high numbers –  sometimes over several hundred faults per second. When the counter goes above several hundred page faults per second for extended durations, you should check other memory counters to try identify if a bottleneck exists .System memory is limited in size and Windows Server supplements the installed RAM with virtual memory, which is more abundant. Windows will start paging to disk when all the installed RAM is being used, and this, in turn, frees the RAM for new processes and applications .

Windows will usually automatically increase the size of pagefile.sys as required, but in certain cases you may wish to tune the system performance and manage the virtual memory settings yourself. Maintaining the default pagefile in the system drive and then adding another pagefile to an additional hard drive can significantly improve performance. Spanning virtual memory across several disks or just putting the pagefile.sys on a second, less frequently accessed disk, will also boost the performance of your Windows Server installation. You will need to ensure that the secondary disk is not slower than the disk pagefile.sys currently is on. The larger the amount of physical memory a system has, the more virtual memory can be allocated.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>