<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:06:02 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-4457] avgObjSize didn&apos;t shrink as expected after updating documents and compacting</title>
                <link>https://jira.mongodb.org/browse/SERVER-4457</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I recently transitioned a collection (&amp;gt; 30MM documents) from long, human readable key names to short, 1 character keys to save on storage space (on disk and in memory) &amp;amp; improve performance.&lt;/p&gt;

&lt;p&gt;I dropped the old indexes, ran a big db.mycollection.update(&lt;/p&gt;
{...}
&lt;p&gt;), compacted the collection (on primary and 2 replicas) then built new indexes. &lt;/p&gt;

&lt;p&gt;The storageSize and totalIndexSize were cut in half (about what I expected).  But avgObjSize hasn&apos;t change significantly for that collection!  I&apos;ve also noticed that paddingFactor is significantly different on each server (1.01, 1.49 on replicas, 1.36 on primary). &lt;/p&gt;

&lt;p&gt;Why wouldn&apos;t the avgObjSize drop by about half?&lt;/p&gt;

&lt;p&gt;---&lt;del&gt;BEFORE&lt;/del&gt;---&lt;/p&gt;

&lt;p&gt;PRIMARY&amp;gt; db.broadcasts.stats()&lt;br/&gt;
{&lt;br/&gt;
	&quot;ns&quot; : &quot;redacted.broadcasts&quot;,&lt;br/&gt;
	&quot;count&quot; : 32370008,&lt;br/&gt;
	&quot;size&quot; : 91792986284,&lt;br/&gt;
	&quot;avgObjSize&quot; : 2835.7418473297876,&lt;br/&gt;
	&quot;storageSize&quot; : 91835727232,&lt;br/&gt;
	&quot;numExtents&quot; : 43,&lt;br/&gt;
	&quot;nindexes&quot; : 5,&lt;br/&gt;
	&quot;lastExtentSize&quot; : 2146426864,&lt;br/&gt;
	&quot;paddingFactor&quot; : 1.5799999997279606,&lt;br/&gt;
	&quot;flags&quot; : 1,&lt;br/&gt;
	&quot;totalIndexSize&quot; : 9271265136,&lt;br/&gt;
	&quot;indexSizes&quot; : &lt;/p&gt;
{
		&quot;_id_&quot; : 1305780784,
		&quot;rebroadcast_of_1&quot; : 903390768,
		&quot;shortened_permalink_1&quot; : 1881060496,
		&quot;channel_id_1_created_at_-1_video_player_1&quot; : 2400301904,
		&quot;created_at_-1_shortened_permalink_1__id_-1&quot; : 2780731184
	}
&lt;p&gt;,&lt;br/&gt;
	&quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;



&lt;p&gt;---&lt;del&gt;AFTER&lt;/del&gt;---&lt;/p&gt;

&lt;p&gt;PRIMARY&amp;gt; db.broadcasts.stats()&lt;br/&gt;
{&lt;br/&gt;
	&quot;ns&quot; : &quot;redacted.broadcasts&quot;,&lt;br/&gt;
	&quot;count&quot; : 32370008,&lt;br/&gt;
	&quot;size&quot; : 91792986284,&lt;br/&gt;
	&quot;avgObjSize&quot; : 2835.7418473297876,&lt;br/&gt;
	&quot;storageSize&quot; : 49060732592,&lt;br/&gt;
	&quot;numExtents&quot; : 23,&lt;br/&gt;
	&quot;nindexes&quot; : 4,&lt;br/&gt;
	&quot;lastExtentSize&quot; : 2146426864,&lt;br/&gt;
	&quot;paddingFactor&quot; : 1.00999999972796,&lt;br/&gt;
	&quot;flags&quot; : 1,&lt;br/&gt;
	&quot;totalIndexSize&quot; : 4578404656,&lt;br/&gt;
	&quot;indexSizes&quot; : &lt;/p&gt;
{
		&quot;_id_&quot; : 945219184,
		&quot;a_1_R_-1_u_1&quot; : 1504187776,
		&quot;M_1_R_-1&quot; : 1571999520,
		&quot;D_1&quot; : 556998176
	}
&lt;p&gt;,&lt;br/&gt;
	&quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment>3 mongo production cluster on Unbuntu 10.10 cloud machines</environment>
        <key id="26268">SERVER-4457</key>
            <summary>avgObjSize didn&apos;t shrink as expected after updating documents and compacting</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="-1">Unassigned</assignee>
                                    <reporter username="dan@shelby.tv">Dan Spinosa</reporter>
                        <labels>
                    </labels>
                <created>Thu, 8 Dec 2011 19:53:07 +0000</created>
                <updated>Wed, 29 Feb 2012 03:54:09 +0000</updated>
                            <resolved>Sun, 11 Dec 2011 05:07:22 +0000</resolved>
                                    <version>2.0.1</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="72207" author="eliot" created="Sun, 11 Dec 2011 05:07:16 +0000"  >&lt;p&gt;Running compact would do it.&lt;/p&gt;</comment>
                            <comment id="71850" author="dan@shelby.tv" created="Thu, 8 Dec 2011 23:22:19 +0000"  >&lt;p&gt;Is there any way to force a paddingFactor re-calculation?  Seems like documents (particularly new ones) are using significantly more space than necessary under the above conditions...&lt;/p&gt;</comment>
                            <comment id="71825" author="eliot" created="Thu, 8 Dec 2011 21:32:48 +0000"  >&lt;p&gt;avgObjSize includes padding - so making documents smaller doesn&apos;t change this.&lt;br/&gt;
We probably need to add an other field that is actual size.&lt;/p&gt;</comment>
                    </comments>
                    <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>Thu, 8 Dec 2011 21:32:48 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 10 weeks, 3 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>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, 10 weeks, 3 days 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="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dan@shelby.tv</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrojmv:</customfieldvalue>

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

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

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