<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:40 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>[JAVA-601] Throughput mongo java driver Versus mongo C driver</title>
                <link>https://jira.mongodb.org/browse/JAVA-601</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;The heap usage in the java driver is causing about 30% of the time to be spent on garbage collection reducing throughput. Worsens with increased number of threads and/or increased heap size. The mongo C driver, in comparison is able to sustain a good thoughput. Sample tests attached. &lt;/p&gt;</description>
                <environment>Linux 2.6.32-220.el6.x86_64&lt;br/&gt;
Red Hat Enterprise Linux Server release 6.2&lt;br/&gt;
java version &amp;quot;1.7.0_05&amp;quot;&lt;br/&gt;
Mongo java driver 2.8.0&lt;br/&gt;
mongodb-linux-x86_64-2.0.6&lt;br/&gt;
App server has 32-cores, hyperthreading, 192gb ram</environment>
        <key id="44068">JAVA-601</key>
            <summary>Throughput mongo java driver Versus mongo C driver</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="3">Duplicate</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="sthampy">Sushil Thampy</reporter>
                        <labels>
                            <label>performance</label>
                    </labels>
                <created>Thu, 12 Jul 2012 18:54:02 +0000</created>
                <updated>Tue, 25 Jun 2013 16:54:27 +0000</updated>
                            <resolved>Fri, 14 Sep 2012 00:58:01 +0000</resolved>
                                    <version>2.8.0</version>
                                                    <component>Performance</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="152145" author="sthampy" created="Thu, 9 Aug 2012 23:10:54 +0000"  >&lt;p&gt;I used a workaround which removed the finalizer ..however the final change is this one: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-610&quot; title=&quot;Make DBCursor finalizer optional and disable it in all cases where there is no cursor maintained on the server&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-610&quot;&gt;&lt;del&gt;JAVA-610&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="152140" author="hoffrocket" created="Thu, 9 Aug 2012 22:47:45 +0000"  >&lt;p&gt;Hi Sushil, do you have a fix you can share?&lt;/p&gt;</comment>
                            <comment id="146568" author="sthampy" created="Tue, 24 Jul 2012 14:32:24 +0000"  >&lt;p&gt;Jeff indicated that GC might be slower collecting instances of com.mongodb.DBApiLayer$Result, because that class has overrides for the finalize method. We tried a test removing the finalize method, and the improvements seen are very good. [ used a ycsb read only workload to compare ]. The time spent in garbage collection went down to less than 1% of the overall execution time (from the 25-30% earlier). The overall reported throughput and average latency is also much better (improvements of about 25-30%). &lt;/p&gt;
</comment>
                            <comment id="142506" author="jeff.yemin" created="Thu, 12 Jul 2012 19:33:11 +0000"  >&lt;p&gt;The Java driver has been optimized over the years to minimize unnecessary heap usage, but there&apos;s only so much that can be done.  See for example this excellent paper comparing performance of C+&lt;ins&gt;/Java/Go/Scala: &lt;a href=&quot;https://days2011.scala-lang.org/sites/days2011/files/ws3-1-Hundt.pdf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://days2011.scala-lang.org/sites/days2011/files/ws3-1-Hundt.pdf&lt;/a&gt;. One of the things they point out is the dramatic affect of GC tuning on the overall performance of Java, but even after tuning the C&lt;/ins&gt;+ application is significantly faster.&lt;/p&gt;

&lt;p&gt;Also, to make the comparison farer, you should comment out the println in the Java program (which, by the way, doesn&apos;t compile as is).&lt;/p&gt;

&lt;p&gt;If you have further suggestions for reducing memory consumption, please open a pull request.  &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="45260">JAVA-610</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="18131" name="MongoTest.java" size="2685" author="sthampy" created="Thu, 12 Jul 2012 18:54:02 +0000"/>
                            <attachment id="18133" name="README" size="1959" author="sthampy" created="Thu, 12 Jul 2012 18:54:02 +0000"/>
                            <attachment id="18132" name="mongotest.c" size="1808" author="sthampy" created="Thu, 12 Jul 2012 18:54:02 +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|hrhb0f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14584</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>