<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:10:08 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-5881] One of the shards is taking more data than others </title>
                <link>https://jira.mongodb.org/browse/SERVER-5881</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I have 6 shards taking applications audit data.One of the shards is taking more data(24GB), when compared with the others(8-9GB). I used all the default settings. Any idea how this can be avoided?&lt;br/&gt;
Thanks,Preetham&lt;br/&gt;
I have attached printShardingStatus() output.&lt;/p&gt;</description>
                <environment>Linux</environment>
        <key id="39241">SERVER-5881</key>
            <summary>One of the shards is taking more data than others </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="9">Done</resolution>
                                        <assignee username="spencer@mongodb.com">Spencer Brody</assignee>
                                    <reporter username="preethamraj">Preetham Derangula</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 May 2012 14:07:24 +0000</created>
                <updated>Wed, 15 Aug 2012 14:24:08 +0000</updated>
                            <resolved>Wed, 20 Jun 2012 19:07:20 +0000</resolved>
                                    <version>2.0.1</version>
                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="134934" author="spencer" created="Wed, 20 Jun 2012 19:07:21 +0000"  >&lt;p&gt;Going to resolve due to inactivity.  If this is still causing you problems feel free to re-open&lt;/p&gt;</comment>
                            <comment id="125136" author="spencer" created="Fri, 1 Jun 2012 15:39:36 +0000"  >&lt;p&gt;Unfortunately it could take quite some time for the lower chunk size to make a difference, since the chunks will only be split to the new smaller sizes after a certain amount of writes have happened to that chunk.  You could speed up the process by manually splitting the chunks on shard 2 using the split chunk command.  If you split the chunks on shard2 into into many smaller pieces, the balancer will then offload them to the other shards.  Information on how to split chunks is available here: &lt;a href=&quot;http://www.mongodb.org/display/DOCS/Splitting+Shard+Chunks&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/Splitting+Shard+Chunks&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;This large an imbalance, however, suggests that there may be something about your shard key or usage pattern that causes this to occur.  How are the UIDs you use for the shard key generated?  Is there any reason that the delete you do would be more likely to hit the other shards than shard2?&lt;/p&gt;</comment>
                            <comment id="123916" author="preethamraj" created="Tue, 29 May 2012 16:34:46 +0000"  >&lt;p&gt;I have made the changes that you were suggested(chunkSize=30now) and gave some time to see if the shard size imbalances would correct them selves. But it didnt correct it self.. I am attaching printstats in the attachments.&lt;/p&gt;</comment>
                            <comment id="123895" author="spencer" created="Tue, 29 May 2012 15:38:06 +0000"  >&lt;p&gt;I&apos;m going to go ahead and resolve this issue.  If you have further questions, feel free to re-open or create a new ticket.&lt;/p&gt;</comment>
                            <comment id="121647" author="spencer" created="Mon, 21 May 2012 20:23:01 +0000"  >&lt;p&gt;The balancer in MongoDB only balances based on number of chunks, not data size, so discrepancies like this in the data size per shard can happen.  It seems like even though the number of chunks is the same for each shard, the chunks on shard 2 have ~100MB of data in them on average, while the chunks on the other shards have closer to 35MB on average.  This could happen if most of the documents being deleted are coming from chunks on the other shards, and not many of them are hitting shard2.  Can you think of any reason this might be the case?&lt;/p&gt;

&lt;p&gt;One thing you can do to help mitigate against this is lower the max chunk size.  This will cause chunks to split more often into smaller pieces, making migrations happen more often, but allowing data to be balanced at a more granular level.  Documentation on how to change the chunk size is available here: &lt;a href=&quot;http://www.mongodb.org/display/DOCS/Sharding+Administration#ShardingAdministration-ChunkSizeConsiderations&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/Sharding+Administration#ShardingAdministration-ChunkSizeConsiderations&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="121587" author="preethamraj" created="Mon, 21 May 2012 18:15:39 +0000"  >&lt;p&gt;Never changed it. Its 200MB. A maintenance process runs every day to delete any data thats older than 8 days.&lt;/p&gt;</comment>
                            <comment id="121585" author="spencer" created="Mon, 21 May 2012 18:13:09 +0000"  >&lt;p&gt;Have you ever changed the chunksize for this cluster?  What is the chunksize now (can find by querying the config.settings collection)?&lt;br/&gt;
How often do documents get deleted?&lt;/p&gt;</comment>
                            <comment id="121583" author="preethamraj" created="Mon, 21 May 2012 18:08:25 +0000"  >&lt;p&gt;No, they are not in MMS.&lt;/p&gt;</comment>
                            <comment id="121576" author="preethamraj" created="Mon, 21 May 2012 17:52:42 +0000"  >&lt;p&gt;shard2 is taking more data. I have attached db.stats() output.&lt;/p&gt;</comment>
                            <comment id="121570" author="spencer" created="Mon, 21 May 2012 17:40:05 +0000"  >&lt;p&gt;Which shard is the one taking more data than the others?  Can you attach db.stats() from the primary of each shard?&lt;br/&gt;
Are these machines in MMS?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="16756" name="dbstats.txt" size="4656" author="preethamraj" created="Mon, 21 May 2012 17:51:44 +0000"/>
                            <attachment id="16880" name="dbstats_05292012.txt" size="5129" author="preethamraj" created="Tue, 29 May 2012 16:36:55 +0000"/>
                            <attachment id="16743" name="printShardingStatus.txt" size="10568" author="preethamraj" created="Mon, 21 May 2012 14:07:25 +0000"/>
                            <attachment id="16879" name="printShardingStatus_05292012.txt" size="7897" author="preethamraj" created="Tue, 29 May 2012 16:36:55 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 21 May 2012 17:40:05 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 35 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></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>preethamraj</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hro2l3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hriqz3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>23023</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|ht08d3:</customfieldvalue>

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