Performance degradation occurs in the UnmapViewOfFile function
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 informationTo 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
Hotfix informationA 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.
Date Time Version Size File name Platform ----------------------------------------------------------------------- 28-Feb-2003 16:17 5.1.2600.1178 1,895,424 Ntkrnlmp.exe i386 28-Feb-2003 16:17 5.1.2600.1178 1,951,232 Ntkrnlpa.exe i386 28-Feb-2003 16:17 5.1.2600.1178 1,923,584 Ntkrpamp.exe i386 28-Feb-2003 16:17 5.1.2600.1178 1,927,424 Ntoskrnl.exe i386 28-Feb-2003 16:17 5.1.2600.1178 5,826,432 Ntkrnlmp.exe ia-64 28-Feb-2003 16:17 5.1.2600.1178 5,736,704 Ntoskrnl.exe ia-64
Windows Server 2003Although 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 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.
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
Article ID: 815227 - Last Review: 12/08/2015 02:07:43 - Revision: 6.3
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
- kbnosurvey kbarchive kbautohotfix kbhotfixserver kbqfe kbwinxpsp2fix kbtshoot kbenv kbqfe kbwinxppresp2fix kbfix kbbug KB815227