<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:23:35 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-10602] Server does not show right resident memory</title>
                <link>https://jira.mongodb.org/browse/SERVER-10602</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Our server does not show right value on the &quot;resident&quot; field in the &quot;mem&quot; object of the server status, since the beginning. We started using MongoDB with 2.0. We use only one database and one collections. Is is about 120 GB now.&lt;/p&gt;

&lt;p&gt;I whink it is wrong because of several reasons. First of all MongoDB cannot respond some queries in out peak times. It gets 30 - 50 queries per seconds and shows 200 - 500 page faults per seconds in the peak times. We solved that problem two times by increasing the memory from 16 GB to 32 GB and from 32 GB to 64 GB. Now, It is happening again. In all of these cases server status was showing less than half of the available memory as resident.&lt;/p&gt;

&lt;p&gt;My second experiment is monitoring caches from the operating system. I try to drop caches, restart the MongoDB server and it gets full again in 30 - 60 seconds but the server status does not show it. For example after 30 minutes after dropping caches, Linux free command shows 62 GB as caches but MongoDB server status show only 7 GB. &lt;/p&gt;

&lt;p&gt;My third experiment is with the tool named Mongomem from ContextLogic, that I found lately. I think it shows the right value which is nearly all of the memory.&lt;/p&gt;

&lt;p&gt;We have tested it with different servers and with different configurations but the situation did not changed. I have tried to &quot;compact&quot; the collections which we have not done before. Server status started show even less resident memory after that.&lt;/p&gt;

&lt;p&gt;It is impossible that we are reading from 1 / 10 of the whole database. So we did not want to believe that MongoDB was using so much memory, for a long time.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/ContextLogic/mongotools&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/ContextLogic/mongotools&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Tested on:&lt;br/&gt;
&lt;br/&gt;
* Red Hat Enterprise Linux Server release 5.4&lt;br/&gt;
* Red Hat Enterprise Linux Server release 6.3&lt;br/&gt;
* Debian 6.0 (squeeze)&lt;br/&gt;
&lt;br/&gt;
On:&lt;br/&gt;
&lt;br/&gt;
* HP ProLiant BL460c G6&lt;br/&gt;
* PowerEdge 11G R510 Rack Server Details&lt;br/&gt;
&lt;br/&gt;
With:&lt;br/&gt;
&lt;br/&gt;
* EMC VNX5300&lt;br/&gt;
* RAID 1 from two 15k RPM disk&lt;br/&gt;
* an 15k RPM disk&lt;br/&gt;
</environment>
        <key id="87009">SERVER-10602</key>
            <summary>Server does not show right resident memory</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="hasegeli">Emre Hasegeli</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 Aug 2013 16:43:31 +0000</created>
                <updated>Wed, 10 Dec 2014 23:06:06 +0000</updated>
                            <resolved>Tue, 18 Mar 2014 04:50:28 +0000</resolved>
                                    <version>2.0.7</version>
                    <version>2.2.5</version>
                                                    <component>Diagnostics</component>
                    <component>Performance</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="518131" author="stennie" created="Tue, 18 Mar 2014 04:50:28 +0000"  >&lt;p&gt;Hi Emre,&lt;/p&gt;

&lt;p&gt;Apologies for the delay in follow-up on this issue.&lt;/p&gt;

&lt;p&gt;There are a number of situations where data may be in RAM (eg filesystem cache) but not currently associated with the MongoDB process. There is some further discussion/investigation on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9415&quot; title=&quot;MongoDB only uses small amount of RAM&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9415&quot;&gt;&lt;del&gt;SERVER-9415&lt;/del&gt;&lt;/a&gt; which may be of interest, particularly the comments from Adam Comerford with reference to journaling and private remapping of memory.&lt;/p&gt;

&lt;p&gt;It looks like the Mongomem tool you mentioned uses the &lt;a href=&quot;http://linux.die.net/man/2/fadvise&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;fadvise()&lt;/a&gt; system call to determine what pages of a file are in memory (irrespective of whether those are currently associated with MongoDB), so you may indeed have more data in RAM than MongoDB&apos;s serverStatus is currently reporting as resident.&lt;/p&gt;

&lt;p&gt;It sounds like you have investigated the obvious tuning options such as readahead and compacting your database.&lt;/p&gt;

&lt;p&gt;I&apos;m going to resolve this issue as a duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9415&quot; title=&quot;MongoDB only uses small amount of RAM&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9415&quot;&gt;&lt;del&gt;SERVER-9415&lt;/del&gt;&lt;/a&gt;, but please feel free to reopen if you have any further questions/concerns on this issue.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Stephen&lt;/p&gt;</comment>
                            <comment id="445345" author="hasegeli" created="Wed, 23 Oct 2013 15:59:03 +0000"  >&lt;p&gt;I monitored them more user heavy load. Some problem persists. I have tried to reduce readahead to 16, 8 and finally 0, reboot the server after before each time. My conclusion is it is not because of readahead but it is still because lack of memory.&lt;/p&gt;</comment>
                            <comment id="431670" author="hasegeli" created="Thu, 26 Sep 2013 08:23:15 +0000"  >&lt;p&gt;I reduced readahead from 256 to 32 on one of the slaves. It seems to work better, reponds more queries, gets less page faults.&lt;/p&gt;</comment>
                            <comment id="421853" author="gregor" created="Tue, 10 Sep 2013 16:13:35 +0000"  >&lt;p&gt;Hi &lt;/p&gt;

&lt;p&gt;This could be explained by have too high readahead - please see this blog for details.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.kchodorow.com/blog/2012/05/10/thursday-5-diagnosing-high-readahead/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.kchodorow.com/blog/2012/05/10/thursday-5-diagnosing-high-readahead/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In that case - the disk is reading a load of extra information from the disk into RAM - which is not included in the resident memory calculation in MongoDB - since it it usually useless &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Can you check readahead?&lt;/p&gt;

&lt;p&gt;thx&lt;br/&gt;
Gregor&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="72533">SERVER-9415</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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 10 Sep 2013 16:13:35 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 48 weeks, 1 day 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            9 years, 48 weeks, 1 day 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>hasegeli</customfieldvalue>
            <customfieldvalue>gregor</customfieldvalue>
            <customfieldvalue>stephen.steneker@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmimn:</customfieldvalue>

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

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

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