<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:13:25 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-7022] File Descriptor Configuration for MongoDB Deployment</title>
                <link>https://jira.mongodb.org/browse/SERVER-7022</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt; Hi,&lt;/p&gt;

&lt;p&gt;I read the link on mongo db site regarding &quot;Too many open files&quot;. (&lt;a href=&quot;http://www.mongodb.org/display/DOCS/Too+Many+Open+Files&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/Too+Many+Open+Files&lt;/a&gt;)&lt;br/&gt;
My MongoDB Setup is:&lt;br/&gt;
1. 1 MongoS, 3 MongoC, 10 MongoD&lt;br/&gt;
2. All MongoDs are running on one server.&lt;br/&gt;
3. On MongoD I am using &quot;--smallfiles&quot; which creates files of maximum 512 MB on disk.&lt;br/&gt;
4. Total disk for all 10 shards is 15TB i.e. 1.5 TB per shard.&lt;br/&gt;
5. At a time total 365 databases are present in the system.&lt;/p&gt;

&lt;p&gt;According to mongodb the formula is:&lt;br/&gt;
//TotalSize = `du -gs &amp;lt;db-path&amp;gt; | cut -f 1`&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;= (TotalSizeGB/2) + (NumberOfDBs) + (max(maxConns, 20,000)) + 5%-overhead&lt;br/&gt;
I calculated file descriptor value for my deployment using above formula. Calculation is:&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;= (15 * 1024)/2 + 365*10 + 20,000 + 5% = 32896&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;My purpose for asking this question is: I set file descriptor value as 35000 on my server.&lt;br/&gt;
But still I am getting &quot;Too Many Open files&quot; error. And this error is coming frequently. (One case which I have seen is when running show dbs command)&lt;br/&gt;
So Should file descriptor value in my deployment be:&lt;/p&gt;

&lt;p&gt;Since filesize in my case is 512 MB instead of 2048 MB(Default) so multiplying TotalSizeGB by 4:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;= (15 * 1024 * 4)/2 + 365*10 + 20,000 + 5% = 57088&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;T&amp;amp;R,&lt;br/&gt;
jitendra verma&lt;/p&gt;
</description>
                <environment>Linux OEL</environment>
        <key id="50322">SERVER-7022</key>
            <summary>File Descriptor Configuration for MongoDB Deployment</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</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="4">Incomplete</resolution>
                                        <assignee username="barrie">Barrie Segal</assignee>
                                    <reporter username="jitendra908">jitendra</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 Sep 2012 13:16:40 +0000</created>
                <updated>Tue, 18 Dec 2012 14:46:20 +0000</updated>
                            <resolved>Thu, 4 Oct 2012 16:44:04 +0000</resolved>
                                    <version>2.0.3</version>
                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="218293" author="ian@10gen.com" created="Tue, 18 Dec 2012 14:46:20 +0000"  >&lt;p&gt;jitendra, for general questions such as this please begin a discussion in our forums at &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/forum/?fromgroups#!forum/mongodb-user&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;if that conversation turns to confirmation you have found a bug, please open a bug here.&lt;/p&gt;</comment>
                            <comment id="218221" author="jitendra908" created="Tue, 18 Dec 2012 12:58:57 +0000"  >&lt;p&gt;Hi ,&lt;br/&gt;
Please updates&lt;br/&gt;
Thanks,&lt;br/&gt;
JRV&lt;/p&gt;</comment>
                            <comment id="213991" author="jitendra908" created="Thu, 13 Dec 2012 14:03:47 +0000"  >&lt;p&gt; Hi,&lt;/p&gt;

&lt;p&gt;We were running with file descriptor setting of 64000 for root user. ulimit -a shows 64000 whereas fs.file-max is 1601695.&lt;br/&gt;
We are still getting &quot;Too many open files&quot;.&lt;/p&gt;

&lt;p&gt;I have a confusion in max connection in the above formula.&lt;br/&gt;
I have 10 mongod processes(shards), 3 mongod config server processes and 1 mongos process running on ONE SYSTEM.&lt;/p&gt;

&lt;p&gt;In the above formula, the (max(maxConns, 20,000)) is for one mongo process or overall for system?&lt;br/&gt;
Meaning Based on connections, should I consider file descriptor limit for system as 20,000 or 280,000(20000 * 14 (mongod, mongos and mongoc))&lt;/p&gt;</comment>
                            <comment id="171447" author="barrie" created="Thu, 4 Oct 2012 16:44:04 +0000"  >&lt;p&gt;Hi Jitendra,&lt;/p&gt;

&lt;p&gt;I&apos;m closing this out. Please feel free to reopen it if you have further questions about this.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Barrie &lt;/p&gt;</comment>
                            <comment id="164723" author="eliot" created="Sat, 15 Sep 2012 14:29:28 +0000"  >&lt;p&gt;How many files do you have?&lt;/p&gt;</comment>
                            <comment id="163648" author="barrie" created="Wed, 12 Sep 2012 20:22:26 +0000"  >&lt;p&gt;Hi Jitendra,&lt;/p&gt;

&lt;p&gt;The Core Server project is generally meant for filing feature requests and bug reports. If you&apos;d like someone to help troubleshoot an issue, please file a ticket in our Google Group &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Barrie &lt;/p&gt;</comment>
                            <comment id="163431" author="jitendra908" created="Wed, 12 Sep 2012 14:19:27 +0000"  >&lt;p&gt;Hi ,&lt;br/&gt;
Please updates&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
JRV&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="59148">SERVER-7911</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>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 12 Sep 2012 20:22:26 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 9 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>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, 9 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>barrie</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
            <customfieldvalue>jitendra908</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnoxj:</customfieldvalue>

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

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

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