This article has been archived. It is offered "as is" and will no longer be updated.
A program that uses mapped file views that are larger than 500 megabytes (MB) may experience a significant performance decrease. Mapped file views are frequently used to share information between two or more processes. The performance degradation occurs in the UnmapViewOfFile function.
This problem occurs if a program maps file views that are larger than 500 MB in Microsoft Windows Server 2003 or in Microsoft Windows XP Service Pack 1 (SP1).
Windows XP Service Pack 1
Service pack information
To resolve this problem, obtain the latest service pack for Windows XP. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
322389 How to obtain the latest Windows XP service pack
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Although the problem manifests with a call to the UnmapViewOfFile function, the required code change is deep within the kernel. Because of the risk of changing core memory management functions, a hotfix for Windows Server 2003 will not be available. The code fix for Windows Server 2003 will be available in Windows Server 2003 Service Pack 1.
Programs that could be affected by this problem can be identified by using Performance Monitor. To do this, follow these steps:
Create a performance monitor log by following the steps that are described in Microsoft Knowledge Base article 248345 or by using the Performance Monitor Wizard. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
248345 How to create a log using System Monitor in Windows
Log server activity during busy times.
Stop the performance monitor log and review Working Set Size Peak under the Process performance object. Find any process where the working set size has exceeded 500 MB.
Subtract the working set size value of each process that you identified in step 3 from the corresponding Private Bytes entry under the Process performance object.
If the working set for a process is 500 MB more than the private bytes, the program could be using large mapped views of files and could be affected by the performance degradation from calling the UnmapViewOfFile function.If these programs are randomly not responding or are unresponsive for long periods of time, debugging analysis or code review may be needed to verify that the programs are affected by this issue.
If the program is affected by this performance issue, the following coding workarounds are available for Windows Server 2003 until Windows Server 2003 Service Pack 1 is available:
Remove calls to the UnmapViewOfFile function in programs that run in Windows Server 2003. This function call is necessary only if the process must map multiple sections of memory to the same memory address. The operating system will clean up the shared sections as soon as the last thread has exited.
If you must call the UnmapViewViewOfFile function, write a new program to create a job object (CreateJobObject). Use the SetInformationJobObject function to set the maximum working set size to approximately 500 MB by setting the MaximumWorkingSetSize property in the _JOBOBJECT_BASIC_LIMIT_INFORMATION parameter. (This setting is 24 MB with the /3GB switch.) Associate all the required processes with this job object.
This program should be run after the required processes have already started. If one of those processes restarts, this program must be rerun. You may not incur a huge performance penalty if you limit the working set size for the process. If there is lots of available RAM on the system, the pages that are removed from the process's working set will be put on the standby list. If a page fault is incurred, it will probably be serviced by the page on the standby list in physical memory. Performance benchmarks should be run to determine the actual performance effect for this workaround.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Microsoft Windows XP Service Pack 2. The problem is scheduled to be fixed in Windows Server 2003 Service Pack 1.
P4, pentium 4, pentium IV, multiproc, dualproc, hyperthreading, kernel, slow performance, office, word, MapViewOfFile, 100% CPU, high CPU usage, delays of 4 seconds
Microsoft Windows Server 2003, Datacenter Edition (32-bit x86), Microsoft Windows Server 2003, Enterprise Edition (32-bit x86), Microsoft Windows Server 2003, Standard Edition (32-bit x86), Microsoft Windows Server 2003, Web Edition, Microsoft Windows XP Home Edition SP1, Microsoft Windows XP Professional SP1