<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:54:22 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-1339] Performance degradation when switching from 2.4.x to 2.6.x with newer Java driver</title>
                <link>https://jira.mongodb.org/browse/JAVA-1339</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;We&apos;re noticing a pretty dramatic decrease in performance on 2.6.x when using the 2.12.x Java drivers rather than the 2.11.x ones. I&apos;m adding this here because it was pointed out to me this is likely due to the newer Java driver using a different code path for writes in which case this is a performance issue related to that code. If this is incorrect feel free to move to the java driver project.&lt;/p&gt;

&lt;p&gt;I have attached to output of mongostat for two test runs. One is 2.11.x Java driver versus 2.6.x and the other uses 2.12.x Java driver.&lt;/p&gt;

&lt;p&gt;There is about a 10-20% difference in raw performance depending on the operation being executed.&lt;/p&gt;

&lt;p&gt;Given the fact that we have to provision capacity for peak usage for our customers this could affect our net hosting costs so it would be good to have a quick resolution to this issue.&lt;/p&gt;</description>
                <environment></environment>
        <key id="147668">JAVA-1339</key>
            <summary>Performance degradation when switching from 2.4.x to 2.6.x with newer Java driver</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="5">Cannot Reproduce</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="remonvv">Remon van Vliet</reporter>
                        <labels>
                            <label>TR</label>
                    </labels>
                <created>Thu, 17 Jul 2014 14:47:06 +0000</created>
                <updated>Wed, 11 Sep 2019 19:12:32 +0000</updated>
                            <resolved>Tue, 23 Jun 2015 02:52:43 +0000</resolved>
                                    <version>2.12.0</version>
                                                    <component>Performance</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="690473" author="remonvv" created="Thu, 14 Aug 2014 12:41:06 +0000"  >&lt;p&gt;Hi Jeff,&lt;/p&gt;

&lt;p&gt;My apologies, I thought I had already replied. The test above was run with {writeConcern : &lt;/p&gt;
{w : 1}
&lt;p&gt;}&lt;/p&gt;</comment>
                            <comment id="688366" author="jeff.yemin" created="Tue, 12 Aug 2014 17:46:11 +0000"  >&lt;p&gt;Remon,&lt;/p&gt;

&lt;p&gt;Just checking in once more to ask about the write concern that your application is using, so we can make some progress on this issue.&lt;/p&gt;


&lt;p&gt;Regards,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="679337" author="robert.j.moore@allanbank.com" created="Sat, 2 Aug 2014 00:10:12 +0000"  >&lt;p&gt;Not sure if this is the Java driver or not but the write concern is not (w:0).&lt;/p&gt;

&lt;p&gt;If you look at the 2.11 mongostat you will see a large number of commands being counted for the &lt;tt&gt;getlasterror&lt;/tt&gt; commands. That only happens for (w:1) or better.&lt;/p&gt;</comment>
                            <comment id="679038" author="dan@10gen.com" created="Fri, 1 Aug 2014 19:18:32 +0000"  >&lt;p&gt;Though the driver did change to handle the new write commands introduced in 2.6, the old code path is still used in the new driver for fire and forget writes (w:0).&lt;/p&gt;

&lt;p&gt;As this does not appear to be a SERVER issue at this time, I&apos;ll move this ticket to the JAVA project where the performance issue can be addressed.&lt;/p&gt;

&lt;p&gt;-Dan&lt;/p&gt;</comment>
                            <comment id="662905" author="remonvv" created="Fri, 18 Jul 2014 10:13:34 +0000"  >&lt;p&gt;1) The issue seems to occur regardless of setup (repset and standalone were tested). The output is from a stand-alone single instance test.&lt;br/&gt;
2) w = 0&lt;br/&gt;
3) No&lt;br/&gt;
4) All of the above. The log posted are from very simple test inserts, queries and updates (save({a:[X]}), find({a:[X]}) and so on&lt;br/&gt;
5) I&apos;ll see what I can do. Our time to investigate this is limited.&lt;br/&gt;
6) See above.&lt;/p&gt;

&lt;p&gt;EDIT : Had some odd test results here but those were likely due to a changed default write concern.&lt;/p&gt;</comment>
                            <comment id="662040" author="thomasr" created="Thu, 17 Jul 2014 16:31:31 +0000"  >&lt;p&gt;Hi Remon,&lt;/p&gt;

&lt;p&gt;To diagnose that kind of performance issue I would need some additional information.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;What setup is this? Sharded? Replica Set? Stand-alone node?&lt;/li&gt;
	&lt;li&gt;Are you using any write concern for your operations? (e.g. w=0, 1, majority)&lt;/li&gt;
	&lt;li&gt;Are you using the bulk API in the java driver for 2.6 as outlined &lt;a href=&quot;http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-java-driver/#bulk-operations&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;e.g. here&lt;/a&gt; ?&lt;/li&gt;
	&lt;li&gt;What kind of operations are you running in this test? I can see queries, inserts, updates, deletes, but can you give more details? Are queries, updates, etc indexed? Ideally, are you able to share the test code?&lt;/li&gt;
	&lt;li&gt;Can you please run the tests with log level 1 or higher ( &lt;tt&gt;mongod -v&lt;/tt&gt; or via &lt;tt&gt;db.adminCommand(&apos;setParameter&apos;: 1, &apos;logLevel&apos;: 1)&lt;/tt&gt; ) and attach the log files of both runs to the ticket?&lt;/li&gt;
	&lt;li&gt;To distinguish if this is a driver or server problem, have you tried running the new 2.12 driver against a 2.4.x mongod? If so, what is the result of that test?&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Once we have that information we can proceed with the diagnosis.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="47926" name="2_11_driver_against_2_6_server.txt" size="48773" author="remonvv" created="Thu, 17 Jul 2014 14:47:06 +0000"/>
                            <attachment id="47927" name="2_12_driver_against_2_6_server.txt" size="59938" author="remonvv" created="Thu, 17 Jul 2014 14:47:06 +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|hrgakv:</customfieldvalue>

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