<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:57:39 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-21538] Choose clock source for reading current time dynamically at startup</title>
                <link>https://jira.mongodb.org/browse/SERVER-21538</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;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.&lt;/p&gt;</description>
                <environment></environment>
        <key id="240102">SERVER-21538</key>
            <summary>Choose clock source for reading current time dynamically at startup</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="schwerin@mongodb.com">Andy Schwerin</reporter>
                        <labels>
                            <label>platforms-re-triaged</label>
                    </labels>
                <created>Wed, 18 Nov 2015 22:28:02 +0000</created>
                <updated>Mon, 1 Jul 2019 17:20:11 +0000</updated>
                            <resolved>Fri, 24 Mar 2017 21:59:07 +0000</resolved>
                                                    <fixVersion>3.4.22</fixVersion>
                    <fixVersion>3.5.5</fixVersion>
                                    <component>Internal Code</component>
                                        <votes>3</votes>
                                    <watches>14</watches>
                                                                                                                <comments>
                            <comment id="2307175" author="xgen-internal-githook" created="Mon, 1 Jul 2019 17:08:31 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Mathias Stearn&apos;, &apos;email&apos;: &apos;mathias@10gen.com&apos;, &apos;username&apos;: &apos;RedBeard0531&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-21538&quot; title=&quot;Choose clock source for reading current time dynamically at startup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-21538&quot;&gt;&lt;del&gt;SERVER-21538&lt;/del&gt;&lt;/a&gt; Use mockable cv wait in background_thread_clock_source_test&lt;/p&gt;

&lt;p&gt;This both makes the test run much faster and avoids spurious failures when&lt;br/&gt;
the system scheduler decides not to run a thread for over a second.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit d55eaad5cdfcfbe8458658d39f8c57102c3b3504)&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/af3b8d9af0ee9a8d16d68d4f09feb9696a15c35d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/af3b8d9af0ee9a8d16d68d4f09feb9696a15c35d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2307174" author="xgen-internal-githook" created="Mon, 1 Jul 2019 17:08:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Mathias Stearn&apos;, &apos;email&apos;: &apos;mathias@10gen.com&apos;, &apos;username&apos;: &apos;RedBeard0531&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-21538&quot; title=&quot;Choose clock source for reading current time dynamically at startup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-21538&quot;&gt;&lt;del&gt;SERVER-21538&lt;/del&gt;&lt;/a&gt; Put BGThreadClockSource to sleep when it isn&apos;t needed&lt;/p&gt;

&lt;p&gt;If it goes through a full granularity of sleeping without being read from, it&lt;br/&gt;
will sleep with no timeout until the next attempt to read the clock.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit b283aecc3a6e65e805c5ffe57b0ad4368faacbfd)&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e7d30fab84dde1c786e2b173fe555314c2298970&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e7d30fab84dde1c786e2b173fe555314c2298970&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1530847" author="xgen-internal-githook" created="Wed, 22 Mar 2017 23:26:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-21538&quot; title=&quot;Choose clock source for reading current time dynamically at startup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-21538&quot;&gt;&lt;del&gt;SERVER-21538&lt;/del&gt;&lt;/a&gt; Use mockable cv wait in background_thread_clock_source_test&lt;/p&gt;

&lt;p&gt;This both makes the test run much faster and avoids spurious failures when&lt;br/&gt;
the system scheduler decides not to run a thread for over a second.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d55eaad5cdfcfbe8458658d39f8c57102c3b3504&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d55eaad5cdfcfbe8458658d39f8c57102c3b3504&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1528784" author="xgen-internal-githook" created="Mon, 20 Mar 2017 22:57:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;RedBeard0531&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-21538&quot; title=&quot;Choose clock source for reading current time dynamically at startup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-21538&quot;&gt;&lt;del&gt;SERVER-21538&lt;/del&gt;&lt;/a&gt; Put BGThreadClockSource to sleep when it isn&apos;t needed&lt;/p&gt;

&lt;p&gt;If it goes through a full granularity of sleeping without being read from, it&lt;br/&gt;
will sleep with no timeout until the next attempt to read the clock.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b283aecc3a6e65e805c5ffe57b0ad4368faacbfd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b283aecc3a6e65e805c5ffe57b0ad4368faacbfd&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1309262" author="supersonic" created="Wed, 29 Jun 2016 01:47:30 +0000"  >&lt;p&gt;Hi Andrew,&lt;/p&gt;

&lt;p&gt;Just to clarify when I was referring to &quot;the issue&quot; 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: &quot;MongoD kills laptop battery&quot;.&lt;/p&gt;

&lt;p&gt;Thanks for clarifying the meaning/relevance of all the issues mentioned!&lt;/p&gt;

&lt;p&gt;Thanks for your efforts to improve MongoDB. It is much appreciated!&lt;/p&gt;

&lt;p&gt;====&lt;/p&gt;

&lt;p&gt;For anyone else reading if you&apos;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.&lt;br/&gt;
#write code&lt;br/&gt;
killall -CONT mongod&lt;br/&gt;
#use MongoDB&lt;br/&gt;
killall -STOP mongod&lt;br/&gt;
#write code&lt;br/&gt;
I&apos;m not sure if it would have side effects on Mongo storing time inaccurately, but it might be fine for development.&lt;/p&gt;</comment>
                            <comment id="1308750" author="acm" created="Tue, 28 Jun 2016 15:33:17 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=supersonic&quot; class=&quot;user-hover&quot; rel=&quot;supersonic&quot;&gt;supersonic&lt;/a&gt; - 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 &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-23243&quot; title=&quot;Extract time-keeping from Listener&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-23243&quot;&gt;&lt;del&gt;SERVER-23243&lt;/del&gt;&lt;/a&gt;). Per the changes made for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-23243&quot; title=&quot;Extract time-keeping from Listener&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-23243&quot;&gt;&lt;del&gt;SERVER-23243&lt;/del&gt;&lt;/a&gt;, we are no longer using select timeouts for fast coarse timing (the specific issue identified in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2114&quot; title=&quot;Don&amp;#39;t use select timeouts for fast coarse timing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2114&quot;&gt;&lt;del&gt;SERVER-2114&lt;/del&gt;&lt;/a&gt;), and therefore that issue was closed. The new issues more accurately describe the remaining work to be done to eliminate (when possible) excess power draw by an idle mongod. Our developers certainly use laptops to develop MongoDB, and while we do find the battery issue problematic, it doesn&apos;t rise to the level of a critical issue. Such issues are typically reserved for &quot;production down&quot; level problems, which this is not. Please note that both this ticket and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18922&quot; title=&quot;Choose time source for measuring short durations dynamically at startup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18922&quot;&gt;&lt;del&gt;SERVER-18922&lt;/del&gt;&lt;/a&gt; have a fixVersion of &apos;3.3 Desired&apos;, meaning that we would like to see them resolved for the upcoming MongoDB 3.4 release.&lt;/p&gt;</comment>
                            <comment id="1308695" author="supersonic" created="Tue, 28 Jun 2016 14:54:57 +0000"  >&lt;p&gt;As a temporary relief/workaround, which helps alleviate the problem a bit...&lt;br/&gt;
I noticed I was getting nearly 900 interprocessor interrupts/sec on my quad core machine. Then I pinned MongoDB to a single core. Now I&apos;m only getting +-200 interprocessor interrupts/sec.&lt;/p&gt;</comment>
                            <comment id="1308686" author="supersonic" created="Tue, 28 Jun 2016 14:49:02 +0000"  >&lt;p&gt;How is this issue different to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18922&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-18922&lt;/a&gt; ? it looks like most of the description is copy/pasted.&lt;br/&gt;
It&apos;s a pity that this issue only has 2 votes and 12 people watching it.&lt;/p&gt;

&lt;p&gt;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&apos;s STILL UNRESOLVED.&lt;br/&gt;
The original issue&lt;br/&gt;
&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2114&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-2114&lt;/a&gt;&lt;br/&gt;
Has 49 watchers and 36 votes as of now.&lt;br/&gt;
Closing the original issue and fragmenting it into multiple issues just makes it seem like:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;its not a big deal&lt;/li&gt;
	&lt;li&gt;nobody cares&lt;/li&gt;
	&lt;li&gt;It&apos;s not an old neglected issue.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;But the opposite of the above points is true.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;It is a big deal&lt;/li&gt;
	&lt;li&gt;Many people have expressed concern/support, someone even submitted a patch in the original issue.&lt;/li&gt;
	&lt;li&gt;The issue is nearly 6 years old and has been neglected.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;MongoDB is painful to use on a laptop, because it makes the battery die. It&apos;s hard to work on a dead laptop. That means this issue is critical.&lt;br/&gt;
One might repond saying that MongoDB runs on servers.&lt;br/&gt;
Well I&apos;ve got news for you, software is written by developers before it finds it&apos;s way onto a server, and developers use laptops.&lt;/p&gt;

&lt;p&gt;I don&apos;t understand why this has gotten so little attention...&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="13728">SERVER-2114</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="210008">SERVER-18922</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="12223">SERVER-1279</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="14340"><![CDATA[v3.4]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 28 Jun 2016 14:49:02 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 32 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-733</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>backlog-server-pm</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 32 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>62.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>
            <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>supersonic</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrkocn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrb0u7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1453">Repl 2017-03-06</customfieldvalue>
    <customfieldvalue id="1617">Repl 2017-03-27</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsffpb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>