Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


May 01, 1998

Paging Peformance


RSS
Subscribe to Windows IT Pro | See More Performance Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

LEARN HOW TO INCREASE YOUR SYSTEM'S EFFICIENCY

Microsoft designed Windows NT to use paging for virtual memory regardless of how much physical memory is available. Paging is the process of temporarily transferring some of the contents of a system's physical memory to the hard disk until the system needs the contents of that memory again. When NT starts, it creates a paging file (pagefile.sys) on the hard disk to store information. Paging frees up physical memory on the system and lets more processes execute. When a process needs code or data that was swapped to the hard disk, the system puts that code or data back into physical memory and transfers other information to the hard disk if necessary. The difference in performance between a hard disk and physical memory is astounding. Hard disk access time is typically 10 milliseconds (ms), whereas physical memory access time is around 60 nanoseconds (ns). Accessing memory is several orders of magnitude faster than accessing the most technologically advanced hard disk drives.

To make your system run more efficiently, you must minimize the effects of paging. One option to reduce paging activity is to add memory. Adding memory reduces the likelihood that the system will rely solely on the hard disk for virtual memory. You can monitor your system's changing memory requirements and properly configure the paging file to maximize paging performance. You must consider the paging file location and size.

Paging File Location Considerations
During the installation process, NT uses contiguous disk space to automatically create the paging file. NT always places the file in the system partition's root directory, although this location is not necessarily ideal. To achieve optimal paging performance, you must look at your disk subsystem configuration to determine whether your system has more than one physical hard disk. If your system has only one hard disk, you'll want to consider adding an extra hard disk. NT supports as many as 16 paging files that it can distribute across multiple drives. Configuring the system to have multiple paging files lets the system make multiple, simultaneous I/O requests to the various hard disks, thereby increasing I/O requests to the paging file.

A system with only one hard disk limits your ability to optimize paging performance. The hard disk must process system and application requests and access the paging file. The physical hard disk might have multiple partitions, but dispersing the paging file among the partitions is a bad idea. Multiple paging files spread across multiple partitions do not increase the hard disk's ability to read or write to the pagefile.sys file. In fact, this setup impedes system performance, because the hard disk must handle paging requests for multiple paging files. However, you can use multiple smaller paging files on multiple partitions on one physical disk when a partition lacks the space to contain an entire paging file.

Calculating Paging File Size
The size of the paging file is critical. Regardless of how many paging files you create, you need to properly size them, or your system will have performance problems. If the paging files are too small, the system might have to enlarge them to compensate for increased paging activity. When a system increases paging file size on the fly, it has to create new space for the paging file while handling paging requests. In this situation, the system will experience excessive page faults. A page fault is when the system must find information outside the process' working set, either elsewhere in physical memory or in the paging file. The system might also start thrashing. Thrashing is when the system lacks the physical and virtual memory resources to satisfy usage requirements and thus relies on the disk subsystem for virtual memory. Thrashing causes the system to spend more time paging than executing applications. Thrashing occurs when the Memory: Pages/sec counter that you monitor from Performance Monitor (Perfmon) is consistently above 100 pages per second. This problem severely decreases system performance. Expanding the paging file on the fly also causes fragmentation. The system might scatter the paging file throughout the disk rather than maintaining it in contiguous space. This fragmentation introduces system overhead and severely degrades performance. Don't make the system responsible for increasing the paging file size.

Microsoft recommends a minimum paging file size of physical RAM + 11MB. During installation, NT configures the minimum paging file size to reflect this value. To determine the appropriate paging file size for your system, you'll want to estimate paging requirements during typical usage (as I explain later in the article), compare your estimate with Microsoft's recommendation, and use the higher value as the minimum. If you want to configure multiple paging files for a system, the minimum size applies to the paging files collectively rather than to each paging file.

To change the paging file's location or size configuration parameters, open the System applet in Control Panel or right-click My Computer on the desktop and select Properties. On the Performance tab, click Change. In the Virtual Memory dialog box, you can change the paging file's location or size to meet the anticipated requirements, as Screen 1 shows. To add another paging file to the existing configuration, select a hard disk that doesn't already have a paging file. Specify the initial size and maximum size (in megabytes) for the paging file, and click Set, OK. Reconfigure the other paging files so that the sum of their minimum sizes reflects the minimum size for the entire system.

To change a paging file's minimum and maximum size, select the hard disk where the paging file resides. Specify the initial size and maximum size (in megabytes) for the paging file, and click Set, OK. Click OK on the System Properties dialog box. When the system prompts you to restart the computer, click Yes.

NT provides several tools to help you determine the system's paging requirements. You can use Task Manager, NT Diagnostics (winmsd.exe), or Perfmon to determine the proper size so the paging file doesn't have to expand on the fly during normal operation.

The absolute minimum paging file size is only 2MB. However, your system performance will suffer if you set the paging file size to such a low value, because the system will have to expand the paging file until it can meet paging requests.

   Previous  [1]  2  Next 


Top Viewed ArticlesView all articles
Battery Life Issues Almost Certainly Not Windows 7's Fault

While Microsoft is still investigating a notebook battery life issue that was supposedly caused by Windows 7, some interesting trends have emerged. ...

Confirmed: Battery Life Issues Not Windows 7's Fault

Microsoft on Monday issued a lengthy statement about the recent Windows 7 battery controversy, echoing my assessment from earlier in the day, but backing it up with hard, cold evidence. Put simply, Windows 7 is not responsible for any battery life issues ...

Getting your iPhone to Sync with Exchange 2003

Follow these steps to use an iPhone with Exchange. ...


Windows OSs Whitepapers Protecting Microsoft SharePoint

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2010 Penton Media, Inc. Terms of Use | Privacy Statement