<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:39:20 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>[GODRIVER-2774] mongo-driver v1.9.1 Cursor.All cpu is very high</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2774</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/attachment/437141/437141_image-2023-03-15-11-02-01-474.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/attachment/437140/437140_image-2023-03-15-11-04-51-621.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Please help me see how to solve it&lt;/p&gt;</description>
                <environment></environment>
        <key id="2288476">GODRIVER-2774</key>
            <summary>mongo-driver v1.9.1 Cursor.All cpu is very high</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="13203">Gone away</resolution>
                                        <assignee username="qingyang.hu@mongodb.com">Qingyang Hu</assignee>
                                    <reporter username="826081159@qq.com">z hh</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Mar 2023 03:09:34 +0000</created>
                <updated>Fri, 27 Oct 2023 20:01:10 +0000</updated>
                            <resolved>Tue, 2 May 2023 12:00:36 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5393553" author="dbeng-pm-bot" created="Tue, 2 May 2023 12:00:38 +0000"  >&lt;p&gt;There hasn&apos;t been any recent activity on this ticket, so we&apos;re resolving it. Thanks for reaching out! Please feel free to comment on this if you&apos;re able to provide more information.&lt;/p&gt;</comment>
                            <comment id="5372074" author="JIRAUSER1268281" created="Mon, 24 Apr 2023 20:47:22 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=826081159%40qq.com&quot; class=&quot;user-hover&quot; rel=&quot;826081159@qq.com&quot;&gt;826081159@qq.com&lt;/a&gt;, we were&#160;trying to reproduce the issue here. Currently, we believe most of the CPU time is spent on &lt;tt&gt;runtime.mallocgc&lt;/tt&gt; when cursor.All() is called for large documents.&lt;/p&gt;

&lt;p&gt;Meanwhile, we&apos;d appreciate it if you could &lt;a href=&quot;https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;profile your program&lt;/a&gt; and share the results here. The profiling diagram may accelerate the investigation by locating the hotspots in your scenario.&lt;/p&gt;

&lt;p&gt;More information about profiling can be found &lt;a href=&quot;https://github.com/google/pprof/blob/main/doc/README.md&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://go.dev/blog/pprof&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="5318244" author="JIRAUSER1273127" created="Mon, 3 Apr 2023 02:51:48 +0000"  >&lt;p&gt;Hello, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=qingyang.hu%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;qingyang.hu@mongodb.com&quot;&gt;qingyang.hu@mongodb.com&lt;/a&gt;&#65292;as follows, 1. cur, err = collection.Find(context.Background(), filter) 2.&#160;var res interface{} cur.All(context.Background(), res)&#65307;I found that the CPU utilization in the second step is very high when the request data is relatively large and the qps is around 30&lt;/p&gt;</comment>
                            <comment id="5311643" author="dbeng-pm-bot" created="Thu, 30 Mar 2023 12:00:54 +0000"  >&lt;p&gt;Hey &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=826081159%40qq.com&quot; class=&quot;user-hover&quot; rel=&quot;826081159@qq.com&quot;&gt;826081159@qq.com&lt;/a&gt;, We need additional details to investigate the problem. If this is still an issue for you, please provide the requested information.&lt;/p&gt;</comment>
                            <comment id="5291827" author="JIRAUSER1268281" created="Wed, 22 Mar 2023 13:31:43 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=826081159%40qq.com&quot; class=&quot;user-hover&quot; rel=&quot;826081159@qq.com&quot;&gt;826081159@qq.com&lt;/a&gt;, can you please let us know the type of &quot;res&quot; in your code? And it will help investigation if you can provide CPU profiling.&lt;/p&gt;</comment>
                            <comment id="5291452" author="JIRAUSER1273127" created="Wed, 22 Mar 2023 11:24:21 +0000"  >&lt;p&gt;I tried it. If the number of requested data items is large (1000), the CPU will increase if the concurrency is large during result parsing; Maybe it&apos;s a problem with bson decoding&lt;/p&gt;</comment>
                            <comment id="5286133" author="esha.bhargava" created="Mon, 20 Mar 2023 19:44:37 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=826081159%40qq.com&quot; class=&quot;user-hover&quot; rel=&quot;826081159@qq.com&quot;&gt;826081159@qq.com&lt;/a&gt; Can you please include more information about what query you are running and the examples of documents that are being returned? Can you also provide a reproducible example and try the latest version of the driver?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="437141" name="image-2023-03-15-11-02-01-474.png" size="41637" author="826081159@qq.com" created="Wed, 15 Mar 2023 03:02:02 +0000"/>
                            <attachment id="437140" name="image-2023-03-15-11-04-51-621.png" size="11912" author="826081159@qq.com" created="Wed, 15 Mar 2023 03:04:52 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1ikh4:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>