[SERVER-21538] Choose clock source for reading current time dynamically at startup Created: 18/Nov/15 Updated: 01/Jul/19 Resolved: 24/Mar/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.4.22, 3.5.5 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andy Schwerin | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 3 |
| Labels: | platforms-re-triaged | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v3.4
|
||||||||||||||||||||||||
| Sprint: | Repl 2017-03-06, Repl 2017-03-27 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 62 | ||||||||||||||||||||||||
| Description |
|
On different hardware and under different virtualization environments, the latency of reading the system clock can fluctuate by over 1000x. When the clock may be read with extremely low latency, we would like to leverage it to provide very precise current time inside the server. When the system clock is of higher latency, we would like to emulate a low-resolution clock that can be read very quickly, so that time calls on such systems do not interfere with the execution of actual user operations. |
| Comments |
| Comment by Githook User [ 01/Jul/19 ] |
|
Author: {'name': 'Mathias Stearn', 'email': 'mathias@10gen.com', 'username': 'RedBeard0531'}Message: This both makes the test run much faster and avoids spurious failures when (cherry picked from commit d55eaad5cdfcfbe8458658d39f8c57102c3b3504) |
| Comment by Githook User [ 01/Jul/19 ] |
|
Author: {'name': 'Mathias Stearn', 'email': 'mathias@10gen.com', 'username': 'RedBeard0531'}Message: If it goes through a full granularity of sleeping without being read from, it (cherry picked from commit b283aecc3a6e65e805c5ffe57b0ad4368faacbfd) |
| Comment by Githook User [ 22/Mar/17 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: This both makes the test run much faster and avoids spurious failures when |
| Comment by Githook User [ 20/Mar/17 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: If it goes through a full granularity of sleeping without being read from, it |
| Comment by super [ 29/Jun/16 ] |
|
Hi Andrew, Just to clarify when I was referring to "the issue" I was focused on the one unwanted side effect (meta issue) that results from all of these specific technical mongodb-developer issues, that a mongodb-user experiences: "MongoD kills laptop battery". Thanks for clarifying the meaning/relevance of all the issues mentioned! Thanks for your efforts to improve MongoDB. It is much appreciated! ==== For anyone else reading if you'd like better laptop battery life while developing with mongod, in addition to my above trick of pinning it to a specific CPU core to reduce interprocessor interrupts. You can also create 2 keybindings or script this before/after your mongodb queries. |
| Comment by Andrew Morrow (Inactive) [ 28/Jun/16 ] |
|
supersonic - The two tickets differ because one is about obtaining time deltas, and the other is about obtaining the current clock time. These are distinct operations, and we need to address both, potentially with different implementations. It is not the case that the larger issue is being ignored, as we are actively working to address it. The first step in that process was to disassociate the clocks and timers from the networking layer, which we have done (see |
| Comment by super [ 28/Jun/16 ] |
|
As a temporary relief/workaround, which helps alleviate the problem a bit... |
| Comment by super [ 28/Jun/16 ] |
|
How is this issue different to https://jira.mongodb.org/browse/SERVER-18922 ? it looks like most of the description is copy/pasted. The original issue where the problem (excessive power consumption, excessive number of wakeups shown in powertop) was reported in 2010 should not have been closed because it's STILL UNRESOLVED.
But the opposite of the above points is true.
MongoDB is painful to use on a laptop, because it makes the battery die. It's hard to work on a dead laptop. That means this issue is critical. I don't understand why this has gotten so little attention... |