[SERVER-8480] Only zero-fill newly allocated files for Windows versions that are affected by NTFS issue Created: 08/Feb/13  Updated: 11/Jul/16  Resolved: 30/Jan/14

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 2.4.0-rc0
Fix Version/s: 2.4.10, 2.5.5

Type: Task Priority: Major - P3
Reporter: Sridhar Nanjundeswaran Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: azure, windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Server 2008 R2 / Windows 7


Issue Links:
Depends
Related
related to SERVER-8082 MongoDB Windows 2008 R2 build should ... Closed
related to DOCS-1106 Windows install documentation should ... Closed
is related to SERVER-8481 Check to see if Windows 8/Server 2012... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   
Issue Status as of March 30, 2014

ISSUE SUMMARY
On Windows platforms code was previously added to zero-fill each newly allocated data file in order to work around an issue described in this Windows Knowledge Base article. As this issue only applies to Windows 7 and Windows Server 2008 R2, the zero-filling unnecessarily slows down file allocation on other, unaffected Windows versions, namely Windows 8 and Windows Server 2012.

USER IMPACT
Slower file allocation on Windows platforms.

SOLUTION
The fix is to restrict the zero-filling of newly allocated files to only the affected Windows versions.

WORKAROUNDS
None

AFFECTED VERSIONS
All recent production release versions up to 2.4.9 are affected.

PATCHES
The fix is included in the 2.4.10 production release and the 2.5.5 development version, which will evolve into the 2.6.0 production release.

Original Description

Currently due to an NTFS issue the server writes zeros to the data file when allocating it. This is not necessary if the OS has the http://support.microsoft.com/kb/2731284 hotfix.
The server needs to detect the install of the above hotfix and bypass writing of 0's



 Comments   
Comment by Daniel Pasette (Inactive) [ 30/Jan/14 ]

commit 4adca0065aff4bd10b317f6fd03cfbb71ae82204
Author: Kaloian Manassiev <kaloian.manassiev@mongodb.com>
Date: Tue Jan 28 13:14:48 2014 -0500

Do not zero-fill newly allocated files on Windows
On Windows platforms code was added to zero-fill each newly allocated data file in order to work around Windows KB http://support.microsoft.com/kb/2731284. The KB only appl
This fix restricts the zeroing-out code to only versions, which have had the bug. It will not check whether the hot fix has been installed.

Comment by Tad Marshall [ 02/May/13 ]

I did some research on this and the results are discouraging. Installed patches are no longer recorded in the registry, but must be queried against an installer database. Each OS has its own SKU series, and these are further split by OS edition (i.e. Server 2008 R2 Enterprise Edition versus Webserver, Standard and HPC Editions, Windows 7 Professional and Ultimate Editions). Beyond this, an installed OS can follow the GDR (General Distribution Release) or LDR (Limited Distribution Release) path, depending on whether or not specific hotfixes have been installed.

The KB article listed in the description only lists 12 manifest files to check for (4 each for x86, amd64 and ia32, so only 8 we need to worry about) so maybe it's not as bad as suggested above.

Further reading:
http://blogs.technet.com/b/mrsnrub/archive/2009/05/14/gdr-qfe-ldr-wth.aspx
http://blogs.technet.com/b/joscon/archive/2011/11/30/how-does-windows-choose-which-version-of-a-file-to-install.aspx
http://blogs.msdn.com/b/ntdebugging/archive/2008/10/21/windows-hotfixes-and-updates-how-do-they-work.aspx

Generated at Thu Feb 08 03:17:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.