<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:21:55 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-29830] Fix async accept performance in TransportLayerASIO</title>
                <link>https://jira.mongodb.org/browse/SERVER-29830</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Using async_accepts causes a performance hit in TransportLayerASIO, even if the rest of the TransportLayer is being used synchronously. Although we should investigate why the perf regression occurs, we should also fix synchronous accept.&lt;/p&gt;</description>
                <environment></environment>
        <key id="397568">SERVER-29830</key>
            <summary>Fix async accept performance in TransportLayerASIO</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13201">Fixed</resolution>
                                        <assignee username="jonathan.reams@mongodb.com">Jonathan Reams</assignee>
                                    <reporter username="jonathan.reams@mongodb.com">Jonathan Reams</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Jun 2017 17:01:38 +0000</created>
                <updated>Thu, 30 Nov 2023 20:13:26 +0000</updated>
                            <resolved>Fri, 8 Sep 2017 20:32:41 +0000</resolved>
                                                    <fixVersion>3.5.13</fixVersion>
                                    <component>Networking</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="1668509" author="ramon.fernandez" created="Fri, 8 Sep 2017 21:11:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: u&apos;jbreams&apos;, &apos;name&apos;: u&apos;Jonathan Reams&apos;, &apos;email&apos;: u&apos;jbreams@mongodb.com&apos;}
&lt;p&gt;Message:&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-29830&quot; title=&quot;Fix async accept performance in TransportLayerASIO&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-29830&quot;&gt;&lt;del&gt;SERVER-29830&lt;/del&gt;&lt;/a&gt; Run async_accept on separate io_context&lt;br/&gt;
Branch:master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d4a9df74058d91f0adf977365589578dca1c1ff1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d4a9df74058d91f0adf977365589578dca1c1ff1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1660710" author="jonathan.reams@10gen.com" created="Wed, 30 Aug 2017 15:26:01 +0000"  >&lt;p&gt;I&apos;ve filed a pull request with the upstream project to fix this.&lt;/p&gt;</comment>
                            <comment id="1659809" author="jonathan.reams@10gen.com" created="Tue, 29 Aug 2017 18:07:56 +0000"  >&lt;p&gt;I dug into this and I think I&apos;ve figured out what&apos;s going on. When a socket is accepted via &lt;tt&gt;async_accept&lt;/tt&gt; it gets registered with epoll even if no async operations ever happen on it. That means that epoll_wait is returning and waking up the listener thread every time a message arrives on a client thread - the listener goes right back to sleep, but the context switch kills perf in the microbenchmarks when there are more client threads than available cores.&lt;/p&gt;

&lt;p&gt;I changed ASIO so that sockets only get registered with epoll when their first async operation occurs and I&apos;m seeing a dramatic perf increase in the microbenchmarks (at least in the insert tests, other tests still running) - &lt;a href=&quot;https://evergreen.mongodb.com/task/performance_linux_mmap_standalone_insert_patch_2d7aef7ca03e3a7153f4e2856ea96a862d88e1de_59a58dd6e3c3317cab00082f_17_08_29_15_53_07&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://evergreen.mongodb.com/task/performance_linux_mmap_standalone_insert_patch_2d7aef7ca03e3a7153f4e2856ea96a862d88e1de_59a58dd6e3c3317cab00082f_17_08_29_15_53_07&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1649292" author="henrik.ingo@10gen.com" created="Wed, 16 Aug 2017 08:13:20 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=acm&quot; class=&quot;user-hover&quot; rel=&quot;acm&quot;&gt;acm&lt;/a&gt; It seems you&apos;ve done your patch on whatever was the tip of master when you have started working on it. Unfortunately there seems to be some unrelated fluctuation in mmapv1 inserts recently, and the commit you have happened to choose as base is a low point in the recent history. This makes the patch build look good, but I&apos;m afraid it is just random luck.&lt;/p&gt;

&lt;p&gt;It would be better if you could apply your patch directly on the failed commit, which is 23448. Unfortunately due to EVG-727, such a patch build at this date will fail the compile phase, since it will compile against wrong version of enterprise modules. However, since this is a regression affecting mmapv1 engine, you can simply remove the enterprise modules and not run the inMemory variant. I think removing these lines would work:&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/ea31111dc95eb309269545348c34791b472f6c25/etc/perf.yml#L45-L49&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/ea31111dc95eb309269545348c34791b472f6c25/etc/perf.yml#L45-L49&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/ea31111dc95eb309269545348c34791b472f6c25/etc/perf.yml#L465-L466&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/ea31111dc95eb309269545348c34791b472f6c25/etc/perf.yml#L465-L466&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the short term though, we can also compare your above result to those old commits. Unfortunately I can&apos;t link to such a display, but:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Click on &quot;Trend&quot; tab above the perf results&lt;/li&gt;
	&lt;li&gt;Click on &quot;Add comparison...&quot; link just above that, and in the text field, paste e394a1740ea and click &quot;Add&quot;&lt;/li&gt;
	&lt;li&gt;Then also paste b05d8d2 and click &quot;Add&quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;e394a1740ea and b05d8d2 are the Evergreen data points after and before the regression (23448), respectively. You should now see that your patch build results are actually below both of those. Which isn&apos;t really helpful, but also not encouraging. (The reason your results are also below e394a1740 are of course very likely completely unrelated to this issue, and probably due to random fluctuation between June and now.)&lt;/p&gt;</comment>
                            <comment id="1648889" author="xgen-internal-githook" created="Tue, 15 Aug 2017 19:16:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;acmorrow&apos;, &apos;email&apos;: &apos;acm@mongodb.com&apos;, &apos;name&apos;: &apos;Andrew Morrow&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-29830&quot; title=&quot;Fix async accept performance in TransportLayerASIO&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-29830&quot;&gt;&lt;del&gt;SERVER-29830&lt;/del&gt;&lt;/a&gt; Mark acceptor sockets as non-blocking&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c4974907a759620380b53a844003baaf115837a9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c4974907a759620380b53a844003baaf115837a9&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <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="2459180">SERVER-81859</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>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</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>Mon, 26 Jun 2017 19:43:03 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 22 weeks, 5 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-719</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>mathias@mongodb.com</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>henrik.ingo@mongodb.com</customfieldvalue>
            <customfieldvalue>jonathan.reams@mongodb.com</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht9t8v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hra0d3:</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="1802">Platforms 2017-07-31</customfieldvalue>
    <customfieldvalue id="1829">Platforms 2017-08-21</customfieldvalue>
    <customfieldvalue id="1877">Platforms 2017-09-11</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|ht9fbb:</customfieldvalue>

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