[SERVER-16634] CLONE - Patch to speed up rs.initiate on Windows 2008 R2 with hotfix Created: 22/Dec/14  Updated: 23/Dec/14  Resolved: 22/Dec/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Alessandro Gherardi Assignee: Neal Rigney
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-14992 Query for Windows 7 File Allocation F... Closed
Participants:

 Description   

Hi,
I implemented a patch for both 2.6.6 and 2.8 that adds a isDataFileZeroingNeeded option for mongoD (Windows only). If isDataFileZeroingNeeded is set to false, data files are not zeroed. This reduces execution time for rs.initialize() from over 5 minutes to a few seconds. Our app's install script can detect if the OS is Windows 2008 R2 and the http://support.microsoft.com/kb/2731284 hotfix is not installed and set isDataFileZeroingNeeded accordingly.

Here's the commit https://github.com/agherardi/mongo/commit/4c580e917c8673a1045eada2148add4fe9ea8924 , on my mongod github branch.

Would you consider adding this change to 2.8?

Thank you,
Alessandro



 Comments   
Comment by Alessandro Gherardi [ 23/Dec/14 ]

Never mind my last question, I figured it out.

Here's the updated patch:
https://github.com/agherardi/mongo/compare/mongodb:master...master

Comment by Alessandro Gherardi [ 23/Dec/14 ]

I have a C++ code snippet that uses COM that I think will do the job. The idea is to use the Windows Update Agent API http://msdn.microsoft.com/en-us/library/windows/desktop/aa387291%28v=vs.85%29.aspx to retrieve the update history. Would this approach be acceptable to you guys?

If yes, I need to link mongoD against ole32.lib and possibly other Win32 libraries. Since I'm not familiar with SCons, can you please explain which build script I need to change to link mongoD against ole32.lib?

Comment by Matt Kangas [ 22/Dec/14 ]

Hi agherardi,

I see that you are trying to optimize file allocation time on Windows 2008 R2 hosts. SERVER-14992 describes our plan for this, which is to make mongod capable of detecting specific hotfixes on Windows.

I see that your current patch adds a command line option which toggles off explicit file zeroing in the file allocator. While I'm sure this is safe in your capable hands, this option will be very dangerous if it is ever set on an unpatched Windows 2008 R2 host.

If you wish to submit a patch that implements SERVER-14992, we will be happy to review it.

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