Microsoft KB Archive/237740

= How to overcome the 4,095 MB paging file size limit in Windows =

Article ID: 237740

Article Last Modified on 10/26/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
 * Microsoft Windows Server 2003, Enterprise Edition
 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows XP Professional x64 Edition
 * Microsoft Windows XP Professional
 * Microsoft Windows XP Home Edition
 * Microsoft Windows 2000 Datacenter Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Professional Edition

-



This article was previously published under Q237740



Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SUMMARY
When you set the paging file size in Windows, the documentation states that the largest paging file that you can select is 4,095 megabytes (MB). This limit is imposed by the page mapping that we use on x86 processors. These processors cannot handle more pages per page file. This is the limit set per volume; you can actually create paging files this large on one or more drives if you need a larger paging file. If extra drives or volumes are not available, you can create multiple paging files on a single drive by placing them in separate folders.

However, you can create a single page file that is more than 4,095 MB on a Microsoft Windows Server 2003 Service Pack 1 (SP1)-based computer.

Notes To create a larger page file, you must load the Physical Address Extension (PAE) kernel. In Windows Server 2003, PAE is automatically enabled when the server is using Hot Add Memory devices. Alternatively, you can force the PAE kernel by adding the /PAE switch in the Boot.ini file.

To get a complete memory dump from computers that have 4 GB RAM or more, it is still necessary to use the /MAXMEM switch in the Boot.ini file. One of the page files on the system partition must still be 1 MB larger than the amount of RAM installed in the computer to successfully create a memory dump. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

108393 The /maxmem switch in the Windows Boot.ini file



MORE INFORMATION
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

Note that reading or writing a paging file of this size can be costly in terms of performance. If you find that you need a paging file of this size, it may be better to add more RAM to the computer. The current algorithm Windows uses to set the default paging file size is:
 * If total physical RAM is less than 2 gigabytes (GB), the paging file is set to 1.5 times the amount of RAM or 2 GB, whichever is smaller.
 * If total physical RAM is equal to or more than 2 GB, the default size is set to 2 GB.

To create multiple paging files on one volume to overcome the 4,095-MB limit:  On the drive or volume you want to hold the paging files, create folders for the number of paging files you want to create on the volume. For example, C:\Pagefile1, C:\Pagefile2, and C:\Pagefile3. Click Start, Click Run, type regedit in the Open box, and then click OK. In the left pane, locate and click the following registry subkey:

 

 Find the Pagingfiles value, and then double-click it to open it. Remove any existing values, and add the following values:

c:\pagefile1\pagefile.sys 3000 4000

c:\pagefile2\pagefile.sys 3000 4000

c:\pagefile3\Pagefile.sys 3000 4000

 Click OK, and then quit Registry Editor.</li> Restart the computer to cause the changes to take effect.</li> Access the virtual memory settings to check the properties of the paging file. To do this, follow these steps.

Access the virtual memory settings on a Windows 2000-based computer <ol style="list-style-type: lower-alpha;"> On the desktop, right-click My Computer, and then click Properties.</li> Click the Advanced tab.</li> Click Performance Options.</li> Click Change.</li></ol>

Access the virtual memory settings on a Windows XP-based or a Windows Server 2003-based computer <ol style="list-style-type: lower-alpha;"> On the desktop, right-click My Computer, and then click Properties.</li> Click the Advanced tab.</li> Under Performance, click Settings.</li> Click the Advanced tab, and then click Change.</li></ol> </li></ol>

In this example, the initial size of the paging files is set to 3000. You could save disk space by setting the initial size of the extra paging files to 0 so that the space is used only if it is needed. The initial size of the paging file is initialized to the minimum size when the computer starts. If the initial size is 3000, that space is reserved on the disk regardless of whether it is being used.

Note To get a complete memory dump from computers that have 4 GB RAM or more, it is still necessary to use the /maxmem switch in the Boot.ini. One of the page files on the system partition must still be 1 MB larger than the amount of RAM installed in the computer to successfully create a memory dump.

Additional query words: 4095 swap page file pagefile

Keywords: kbproductlink kbdiskmemory kbhowto KB237740

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.