<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:15:54 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-27689] WiredTiger disk usage stats output does not seem correct</title>
                <link>https://jira.mongodb.org/browse/SERVER-27689</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I have 3.2.3 server running wiredtiger. The stats output does not seem reasonable. &lt;/p&gt;

&lt;p&gt;I would expect  Storage size ~= datasize + indexsize&lt;/p&gt;

&lt;p&gt;But in this case it seems to be way off.&lt;/p&gt;

&lt;p&gt;db.stats();&lt;/p&gt;
{
	&quot;db&quot; : &quot;xxx&quot;,
	&quot;collections&quot; : 9,
	&quot;objects&quot; : 202860,
	&quot;avgObjSize&quot; : 13789.263595583161,
	&quot;dataSize&quot; : 2797290013,
	&quot;storageSize&quot; : 10694090752,
	&quot;numExtents&quot; : 0,
	&quot;indexes&quot; : 17,
	&quot;indexSize&quot; : 18022400,
	&quot;ok&quot; : 1
}
</description>
                <environment></environment>
        <key id="345851">SERVER-27689</key>
            <summary>WiredTiger disk usage stats output does not seem correct</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="david.hows">David Hows</assignee>
                                    <reporter username="dharshanr@scalegrid.net">Dharshan Rangegowda</reporter>
                        <labels>
                    </labels>
                <created>Sat, 14 Jan 2017 20:37:43 +0000</created>
                <updated>Tue, 24 Jan 2017 02:35:27 +0000</updated>
                            <resolved>Tue, 24 Jan 2017 02:35:27 +0000</resolved>
                                                                    <component>WiredTiger</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1483439" author="david.hows" created="Tue, 24 Jan 2017 01:11:36 +0000"  >&lt;p&gt;Hi Dharshan,&lt;/p&gt;

&lt;p&gt;Glad to hear this worked.&lt;/p&gt;

&lt;p&gt;The repairDatabase command doesn&apos;t reclaim disk space with WiredTiger, but does with the MMAP storage engine.&lt;/p&gt;

&lt;p&gt;I&apos;l be raising a documentation ticket to have this addressed.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
David&lt;/p&gt;</comment>
                            <comment id="1483001" author="dharshanr@scalegrid.net" created="Mon, 23 Jan 2017 19:59:05 +0000"  >&lt;p&gt;Hi David,&lt;/p&gt;

&lt;p&gt;The compact command on the collection reclaimed the disk space. However the --repair option on the whole instance did not reclaim the disk space. Is this a bug? It used to reclaim space in previous versions of mongo.&lt;/p&gt;</comment>
                            <comment id="1482231" author="david.hows" created="Mon, 23 Jan 2017 01:58:01 +0000"  >&lt;p&gt;Hi Dharshan,&lt;/p&gt;

&lt;p&gt;Do you have a follow up here?&lt;/p&gt;

&lt;p&gt;Did the compact reclaim the disk space as expected?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
David&lt;/p&gt;</comment>
                            <comment id="1478726" author="dharshanr@scalegrid.net" created="Wed, 18 Jan 2017 03:28:56 +0000"  >&lt;p&gt;I ran an instance wide mongod --repair ...  and that doesn&apos;t seem to have done anything. Shouldn&apos;t that do a compact as well?&lt;/p&gt;

&lt;p&gt;I will trigger the compact per collection and report results.&lt;/p&gt;
</comment>
                            <comment id="1477663" author="david.hows" created="Tue, 17 Jan 2017 03:46:19 +0000"  >&lt;p&gt;Hi Dharshan,&lt;/p&gt;

&lt;p&gt;Looking through those stats I can see that there are two collections which have a very high &quot;file bytes available for reuse&quot; value - both around 4GB.&lt;/p&gt;

&lt;p&gt;In this case, it looks like either some form of fragmentation, or the collection has recently been shrunk considerably and the space has not yet been reclaimed. In this case it was the &lt;tt&gt;db.xxx3&lt;/tt&gt; and &lt;tt&gt;db.xxx8&lt;/tt&gt; collections - has the amount of data in those collections shrunk significantly from it&apos;s peak?&lt;/p&gt;

&lt;p&gt;Can you arrange to have &lt;tt&gt;compact&lt;/tt&gt; run on these collections and confirm if this resolves the size issues?&lt;/p&gt;</comment>
                            <comment id="1477519" author="dharshanr@scalegrid.net" created="Mon, 16 Jan 2017 20:33:36 +0000"  >&lt;p&gt;Also note that snappy compression is enabled.&lt;/p&gt;</comment>
                            <comment id="1477516" author="dharshanr@scalegrid.net" created="Mon, 16 Jan 2017 20:23:23 +0000"  >&lt;p&gt;Hi David,&lt;/p&gt;

&lt;p&gt;The stats output for each of the 9 collections in the DB is attached to the ticket. The names have xxx&apos;ed out. Let me know if you need anything else from my end.&lt;/p&gt;</comment>
                            <comment id="1477182" author="david.hows" created="Mon, 16 Jan 2017 02:51:47 +0000"  >&lt;p&gt;Hi Dharshan,&lt;/p&gt;

&lt;p&gt;Your algorithm is slightly wrong under WiredTiger with indexSize and storageSize representing total bytes stored on disk and dataSize representing the size of all the documents in the collection. Under normal circumstances we would expect the storageSize to be within 0.5x-2x of the dataSize, depending on compression ratios, checkpoint activity, etc. &lt;/p&gt;

&lt;p&gt;So, with this in mind the issue here is that the 10GB of reported storageSize is many times larger than the 2GB of data stored.&lt;/p&gt;

&lt;p&gt;It&apos;s possible this is a known bug, but without more data I cannot say for certain. The next piece of data I would be looking for are the &lt;tt&gt;db.collection.stats()&lt;/tt&gt; outputs for each of the 9 collections in this database to confirm if this issue is isolated to one collection or to many.&lt;/p&gt;

&lt;p&gt;From there, unless this is a new bug, the likely remedial steps would be to upgrade to the latest 3.2 point release (3.2.11) and then run &lt;tt&gt;compact&lt;/tt&gt; on the collection.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="348388">DOCS-9814</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="147661" name="stats.txt" size="50080" author="dharshanr@scalegrid.net" created="Mon, 16 Jan 2017 20:22:51 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 15 Jan 2017 23:10:52 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 3 weeks, 2 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>david.hows</customfieldvalue>
            <customfieldvalue>dharshanr@scalegrid.net</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht10gf:</customfieldvalue>

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

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