martedì 27 maggio 2008

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

Article ID: 237740 Last Review: October 26, 2007 Revision: 6.7

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 (http://support.microsoft.com/kb/108393/) The /maxmem switch in the Windows Boot.ini file

MORE INFORMATION

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

322756 (http://support.microsoft.com/kb/322756/) How to back up and restore the registry in Windows

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:

1.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.

2.Click Start, Click Run, type regedit in the Open box, and then click OK.

3.In the left pane, locate and click the following registry subkey:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\MemoryManagement

4.Find the Pagingfiles value, and then double-click it to open it.

5.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

6.Click OK, and then quit Registry Editor.

7.Restart the computer to cause the changes to take effect.

8.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

a. On the desktop, right-click My Computer, and then click Properties.

b. Click the Advanced tab.

c. Click Performance Options.

d. Click Change.

Access the virtual memory settings on a Windows XP-based or a Windows Server 2003-based computer

a. On the desktop, right-click My Computer, and then click Properties.

b. Click the Advanced tab.

c. Under Performance, click Settings.

d. Click the Advanced tab, and then click Change.

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.


APPLIES TO
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • 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

Nessun commento: