<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:18:51 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-28712] serverStatus collect extraInfo may be slow?</title>
                <link>https://jira.mongodb.org/browse/SERVER-28712</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In mongod&apos;s slow log. I got so many lines like below:&lt;br/&gt;
Mon Apr 10 11:05:01.426 I COMMAND  &lt;span class=&quot;error&quot;&gt;&amp;#91;ftdc&amp;#93;&lt;/span&gt; serverStatus was very slow: &lt;/p&gt;
{ after basic: 0, after asserts: 0, after connections: 0, after extra_info: 1410, after globalLock: 1410, after locks: 1410, after network: 1410, after opcounters: 1410, after opcountersRepl: 1410, after repl: 1410, after storageEngine: 1410, after tcmalloc: 1410, after wiredTiger: 1410, at end: 1420 }
&lt;p&gt;there are so many lines like above.&lt;br/&gt;
from the ftdc flag, I know it is generated from the diagonal thread, but this is not important.&lt;/p&gt;

&lt;p&gt;What is important is that time all grows after getting extra_info. Which I found is to run mallinfo() on linux after digging into the code.&lt;/p&gt;

&lt;p&gt;I doubt that mallinfo may be slow in some situations because all the slow logs I got is caused by the time-cost after extra_info.&lt;/p&gt;</description>
                <environment></environment>
        <key id="372582">SERVER-28712</key>
            <summary>serverStatus collect extraInfo may be slow?</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="13202">Works as Designed</resolution>
                                        <assignee username="mark.agarunov">Mark Agarunov</assignee>
                                    <reporter username="wolf_kdy">deyukong</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Apr 2017 14:13:24 +0000</created>
                <updated>Fri, 27 Oct 2023 13:54:31 +0000</updated>
                            <resolved>Fri, 19 May 2017 21:34:03 +0000</resolved>
                                                                    <component>Performance</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="1745072" author="wolf_kdy" created="Thu, 7 Dec 2017 05:24:05 +0000"  >&lt;p&gt;We have found the problem.&lt;br/&gt;
a high-loaded mongod with thounds of connections(or threads, both the same),  huge amount of memory (64GB is enough).&lt;br/&gt;
If you keep doing  &apos;cat /proc/mongod_pid/smaps&apos;&#65292; you will see that mongod getting slow logs.&lt;br/&gt;
On our machines, there is a monitor-agent that reads every process&apos; memory stat by reading /proc/pid/smaps&#65292; every time agent does this, mongod hangs.&lt;br/&gt;
Reasons more intrinsical is inside linux kernal.&lt;/p&gt;

&lt;p&gt;If someone meets this situation, you should strace the monitor-agent to see if mongod&apos;s smaps is being read.&lt;/p&gt;</comment>
                            <comment id="1575977" author="wolf_kdy" created="Sat, 20 May 2017 04:09:49 +0000"  >&lt;p&gt;Perhaps more consideration should be taken.&lt;br/&gt;
There are two doubts that are still unclear&lt;br/&gt;
1) why are all the serverStatus slowlog output all the same, time grows from extra_info which is collecting mallinfo in tcmalloc ?&lt;br/&gt;
2) Maunally run db.runCommand(&lt;/p&gt;
{&apos;serverStatus&apos;:1}
&lt;p&gt;) can trigger slow serverStatus, followed by a huge amount of other slow queries.&lt;br/&gt;
I think you should test the behavior of mongod with tcmalloc with high load, (eg, 5000 active threads and 200GB or more memory). in this situation, you will see tcmalloc&apos;s costing most of the cputime by perf top  I strongly doubt that tcmalloc&apos;s mallinfo may block memory allocation and release, That may be the reason each serverStatus will be followed by large amounts of other slowquerys, some of which may be very simple key-value operation and should never be slow.&lt;/p&gt;</comment>
                            <comment id="1547440" author="mark.agarunov" created="Wed, 12 Apr 2017 18:45:18 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=wolf_kdy&quot; class=&quot;user-hover&quot; rel=&quot;wolf_kdy&quot;&gt;wolf_kdy&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for providing the files. Looking over the diagnostic data and logs, it appears that as there is more load placed on the server, as a result &lt;tt&gt;serverStatus&lt;/tt&gt; takes longer to return and times out. I don&apos;t see anything that would indicate a bug, after the load on the server is increased, the performance seems to be relatively consistent. If you are not seeing a performance degradation, this appears to be working as expected.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Mark&lt;/p&gt;</comment>
                            <comment id="1546734" author="wolf_kdy" created="Wed, 12 Apr 2017 03:23:18 +0000"  >&lt;p&gt;@Mark Agarunov&lt;br/&gt;
I&apos;ve sent you an email which contains what you need&lt;/p&gt;</comment>
                            <comment id="1546131" author="mark.agarunov" created="Tue, 11 Apr 2017 17:21:34 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=wolf_kdy&quot; class=&quot;user-hover&quot; rel=&quot;wolf_kdy&quot;&gt;wolf_kdy&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for the report. To better investigate the behavior you&apos;ve described, I&apos;d like to request some additional information. Could you please provide the following:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;The complete logs from mongod when this issue is present,&lt;/li&gt;
	&lt;li&gt;An archive (tar or zip) of the &lt;tt&gt;$dbpath/diagnostic.data&lt;/tt&gt; directory&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Thanks,&lt;br/&gt;
Mark&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="372125">SERVER-28693</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="153905" name="diagnostic.data.7z" size="100840861" author="mark.agarunov" created="Wed, 12 Apr 2017 17:14:47 +0000"/>
                            <attachment id="153900" name="mongod.log.2017-04-10T02-19-56.zip" size="1048576" author="mark.agarunov" created="Wed, 12 Apr 2017 17:08:42 +0000"/>
                    </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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 11 Apr 2017 17:21:34 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 9 weeks, 6 days ago
                        </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>wolf_kdy</customfieldvalue>
            <customfieldvalue>mark.agarunov</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht5k47:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsxw5r:</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_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|hriwnr:</customfieldvalue>

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