DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 2549369 - Last Review: May 23, 2011 - Revision: 1.0

SYMPTOMS

Operating system performance may degrade when one or more processes access multiple large files using the CreateFile() API and the FILE_FLAG_RANDOM_ACCESS flag. The performance degradation is due to the system cache consuming available memory (visible in the performance counter Memory\Cache Bytes).

CAUSE

The FILE_FLAG_RANDOM_ACCESS flag is a hint to the Cache Manager that the file will be opened for random I/O. Random I/O means there is no predictable pattern to the I/O that will take place. This flag disables intelligent read-aheads and prevents automatic unmapping of views after pages are read to minimize mapping/unmapping when the process revisits that part of the file. This keeps previously read views in the Cache Manager working set. However, if the cumulative size of the accessed files exceeds physical memory, keeping so many views in the Cache Manager working set may be detrimental to overall operating system performance because it can consume a large amount of physical RAM.

RESOLUTION

Remove the FILE_FLAG_RANDOM_ACCESS flag when the application opens the file(s) with CreateFile. This will allows the views to be unmapped and moved to the standby list after page reads are completed. This will require involvement from the software developer.

MORE INFORMATION

CreateFile Function
http://msdn.microsoft.com/en-us/library/aa363858(v=VS.85).aspx (http://msdn.microsoft.com/en-us/library/aa363858(v=VS.85).aspx)
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use (http://go.microsoft.com/fwlink/?LinkId=151500) for other considerations.

APPLIES TO
  • Windows Server 2008 Datacenter
  • Windows Server 2008 Enterprise
  • Windows Server 2008 Standard
  • Windows Server 2008 R2 Datacenter
  • Windows Server 2008 R2 Enterprise
  • Windows Server 2008 R2 Standard
Keywords: 
KB2549369
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support