[SERVER-9242] serverStatus workingSet and indexCounters not working on Windows Created: 04/Apr/13 Updated: 11/Jul/16 Resolved: 26/Apr/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Performance |
| Affects Version/s: | 2.4.1 |
| Fix Version/s: | 2.4.4, 2.5.0 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | David Verdejo | Assignee: | Tad Marshall |
| Resolution: | Done | Votes: | 0 |
| Labels: | workingset | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
db version v2.4.1 |
||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | Windows | ||||||||||||||||||||
| Steps To Reproduce: | rs:PRIMARY> db.serverStatus( { workingSet: 1 }) |
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Output commnad db.serverStatus( { workingSet: 1 }): workingSet info not supported
|
| Comments |
| Comment by auto [ 30/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-26T14:29:10Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Remove the call to show_warnings() from show_help_text(). Showing startup warnings in response to a request for information on | |||||||||||||||||||||||||||||||||
| Comment by auto [ 30/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-22T17:10:00Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Until | |||||||||||||||||||||||||||||||||
| Comment by auto [ 30/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-11T09:10:38Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by auto [ 30/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-11T09:08:25Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by auto [ 30/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-05T19:25:04Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Add test to make sure that db.serverStatus() returns workingSet and | |||||||||||||||||||||||||||||||||
| Comment by auto [ 30/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-05T19:28:24Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Only cache values for blockCheckSupported() after the value has been | |||||||||||||||||||||||||||||||||
| Comment by auto [ 26/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-26T14:29:10Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Remove the call to show_warnings() from show_help_text(). Showing startup warnings in response to a request for information on | |||||||||||||||||||||||||||||||||
| Comment by Tad Marshall [ 22/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-22T13:10:00Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: (This comment added by hand – Github hook didn't run for some reason). | |||||||||||||||||||||||||||||||||
| Comment by Tad Marshall [ 22/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Windows "mongod.exe --help" crashes because command line options are processed before MONGO_INITIALIZERs run and the --help option tries to display startup warnings, which depend on the psapiGlobal being set by the "SystemInfo" initializer. Log:
Stack trace from debugger:
| |||||||||||||||||||||||||||||||||
| Comment by auto [ 11/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-11T09:10:38Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by auto [ 11/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-11T09:08:25Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by auto [ 10/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-05T19:25:04Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Add test to make sure that db.serverStatus() returns workingSet and | |||||||||||||||||||||||||||||||||
| Comment by auto [ 05/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'date': u'2013-04-05T19:28:24Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Only cache values for blockCheckSupported() after the value has been | |||||||||||||||||||||||||||||||||
| Comment by Tad Marshall [ 05/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
Btree indexCounters has the same problem. The state of blockCheckSupported() is cached before it is ready.
Waiting until the value is ready before caching it fixes this:
| |||||||||||||||||||||||||||||||||
| Comment by Tad Marshall [ 04/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
This is worse than just losing the workingSet feature; it also prevents the Windows QueryWSEx() API from being used to see if a data page is in the working set, so it could affect performance as well. | |||||||||||||||||||||||||||||||||
| Comment by Tad Marshall [ 04/Apr/13 ] | |||||||||||||||||||||||||||||||||
|
I verified that this is true and it is a bug. The actual value for "blockCheckSupported()" and a constant holding a copy of that value are both statically initialized, meaning that the order in which they are initialized is unspecified. In this case, the constant "blockSupported" is first set to the unitialized value of "blockCheckSupported()" and then the correct value of blockCheckSupported is determined. This bug only affects Windows because Windows is the only platform where the availability of the "blockCheckSupported()" feature is a runtime check. Linux and the Mac just return "true", for example. |