<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:06:00 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-4446] Does not reuse allocated disk</title>
                <link>https://jira.mongodb.org/browse/SERVER-4446</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;re: &lt;a href=&quot;https://groups.google.com/group/mongodb-user/browse_thread/thread/6df6a4aa7101c2b7?hl=en#&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/group/mongodb-user/browse_thread/thread/6df6a4aa7101c2b7?hl=en#&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;New space always allocated even when currently allocated fileSize is large compared to storageSize.&lt;/p&gt;

&lt;p&gt;simple example:&lt;br/&gt;
1.using mongoinsert inserting 1-2 GB data to one collection.&lt;br/&gt;
2.remove all records from collection&lt;br/&gt;
3.compact collection&lt;br/&gt;
4.querying db.stats(). &lt;br/&gt;
5.repeat.&lt;/p&gt;

&lt;p&gt;I expected allocated disk to grow with initial insert, remove and compact. I do not expect to see filesize grow on subsequent iterations of the same. I assumed it would reuse the space it knew it had free. That seems not to be the case. Before the last insert, there is approx fileSize-storageSize = 12GB &lt;br/&gt;
available. &lt;/p&gt;

&lt;p&gt;&amp;gt; //loading 2 mil thingies using mongoimport&lt;br/&gt;
&amp;gt; db.stats() &lt;/p&gt;
{ 
        &quot;db&quot; : &quot;mango&quot;, 
        &quot;collections&quot; : 3, 
        &quot;objects&quot; : 2047904, 
        &quot;avgObjSize&quot; : 1571.746865087426, 
        &quot;dataSize&quot; : 3218786692, 
        &quot;storageSize&quot; : 3577475072, 
        &quot;numExtents&quot; : 32, 
        &quot;indexes&quot; : 1, 
        &quot;indexSize&quot; : 77688352, 
        &quot;fileSize&quot; : 4226809856, 
        &quot;nsSizeMB&quot; : 16, 
        &quot;ok&quot; : 1 

} 
&lt;p&gt;&amp;gt; db.thingies.remove() &lt;br/&gt;
&amp;gt; db.thingies.runCommand(&apos;compact&apos;) &lt;/p&gt;
{ &quot;ok&quot; : 1 } 
&lt;p&gt;&amp;gt; db.stats() &lt;/p&gt;
{ 
        &quot;db&quot; : &quot;mango&quot;, 
        &quot;collections&quot; : 3, 
        &quot;objects&quot; : 4, 
        &quot;avgObjSize&quot; : 45, 
        &quot;dataSize&quot; : 180, 
        &quot;storageSize&quot; : 721420288, 
        &quot;numExtents&quot; : 3, 
        &quot;indexes&quot; : 1, 
        &quot;indexSize&quot; : 8176, 
        &quot;fileSize&quot; : 6373244928, 
        &quot;nsSizeMB&quot; : 16, 
        &quot;ok&quot; : 1 
} 
&amp;gt; //add the 2 mill again using mongoimport
&amp;gt; db.stats() 
{ 
        &quot;db&quot; : &quot;mango&quot;, 
        &quot;collections&quot; : 3, 
        &quot;objects&quot; : 2047904, 
        &quot;avgObjSize&quot; : 1571.7465193680953, 
        &quot;dataSize&quot; : 3218785984, 
        &quot;storageSize&quot; : 3872567296, 
        &quot;numExtents&quot; : 6, 
        &quot;indexes&quot; : 1, 
        &quot;indexSize&quot; : 79675120, 
        &quot;fileSize&quot; : 10666115072, 
        &quot;nsSizeMB&quot; : 16, 
        &quot;ok&quot; : 1 
} 
&amp;gt; db.thingies.remove() 
&amp;gt; db.thingies.runCommand(&apos;compact&apos;) 
{ &quot;ok&quot; : 1 } 
&lt;p&gt;&amp;gt; db.stats() &lt;br/&gt;
{ &lt;br/&gt;
        &quot;db&quot; : &quot;mango&quot;, &lt;br/&gt;
        &quot;collections&quot; : 3, &lt;br/&gt;
        &quot;objects&quot; : 4, &lt;br/&gt;
        &quot;avgObjSize&quot; : 45, &lt;br/&gt;
        &quot;dataSize&quot; : 180, &lt;br/&gt;
        &quot;storageSize&quot; : 1495941120, &lt;br/&gt;
        &quot;numExtents&quot; : 3, &lt;br/&gt;
        &quot;indexes&quot; : 1, &lt;br/&gt;
        &quot;indexSize&quot; : 8176, &lt;br/&gt;
        &quot;fileSize&quot; : 12812550144, &lt;br/&gt;
        &quot;nsSizeMB&quot; : 16, &lt;br/&gt;
        &quot;ok&quot; : 1 &lt;br/&gt;
} &lt;br/&gt;
&amp;gt; //load them one more time using mongoimport&lt;br/&gt;
&amp;gt; db.stats() &lt;br/&gt;
{ &lt;br/&gt;
        &quot;db&quot; : &quot;mango&quot;, &lt;br/&gt;
        &quot;collections&quot; : 3, &lt;br/&gt;
        &quot;objects&quot; : 2047904, &lt;br/&gt;
        &quot;avgObjSize&quot; : 1571.7464666312483, &lt;br/&gt;
        &quot;dataSize&quot; : 3218785876, &lt;br/&gt;
        &quot;storageSize&quot; : 3291062272, &lt;br/&gt;
        &quot;numExtents&quot; : 4, &lt;br/&gt;
        &quot;indexes&quot; : 1, &lt;br/&gt;
        &quot;indexSize&quot; : 79748704, &lt;br/&gt;
        &quot;fileSize&quot; : 14958985216, &lt;br/&gt;
        &quot;nsSizeMB&quot; : 16, &lt;br/&gt;
        &quot;ok&quot; : 1 &lt;br/&gt;
} &lt;/p&gt;

&lt;p&gt;//we now have 14+ GB allocated to Mongo but only 3 in use. &lt;/p&gt;


</description>
                <environment>win 2008 r2, vm </environment>
        <key id="26145">SERVER-4446</key>
            <summary>Does not reuse allocated disk</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="milkie@mongodb.com">Eric Milkie</assignee>
                                    <reporter username="markacurran@gmail.com">Mark Curran</reporter>
                        <labels>
                            <label>storage</label>
                    </labels>
                <created>Wed, 7 Dec 2011 09:51:09 +0000</created>
                <updated>Fri, 30 Mar 2012 14:26:52 +0000</updated>
                            <resolved>Fri, 13 Jan 2012 20:07:50 +0000</resolved>
                                    <version>2.0.1</version>
                                                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="77498" author="milkie" created="Wed, 4 Jan 2012 14:02:10 +0000"  >&lt;p&gt;Is there anything further or can I resolve this?&lt;/p&gt;</comment>
                            <comment id="71502" author="milkie" created="Wed, 7 Dec 2011 20:09:38 +0000"  >&lt;p&gt;Sorry, I meant version &quot;2.1.0&quot; in the above comment, not &quot;2.1.1&quot;.  I edited it to be correct.&lt;/p&gt;</comment>
                            <comment id="71451" author="milkie" created="Wed, 7 Dec 2011 18:07:26 +0000"  >&lt;p&gt;I believe that with the upcoming release of 2.1.0, the behavior for this will be a lot better.  By running &quot;compact&quot; you are definitely experiencing the effects of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3791&quot; title=&quot;compact always creates a new extent&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3791&quot;&gt;&lt;del&gt;SERVER-3791&lt;/del&gt;&lt;/a&gt;.  Even if you don&apos;t add or remote documents and just run &quot;compact&quot; repeatedly, the database will continue to allocate new disk space.&lt;/p&gt;

&lt;p&gt;After 2.1.0, you should be able to add 2 million items and remove them, repeatedly, and the disk space should not continuously grow.  Running &quot;compact&quot; will consume a bit of disk space the first time it runs; each successive &quot;compact&quot; should consume almost no new disk space, as long as the data haven&apos;t changed much.&lt;/p&gt;

&lt;p&gt;If you avoid running the compacts in your test, does the allocated disk space still grow?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="22038">SERVER-3791</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 7 Dec 2011 18:07:26 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 7 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>false</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>
                            12 years, 7 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="10022"><![CDATA[Windows]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>markacurran@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrojrj:</customfieldvalue>

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

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

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