...
On rhel 6.6 (mongodb was installed with rpm) the issue of ulimits, documentation says the following: http://docs.mongodb.org/manual/reference/ulimit/#recommended-ulimit-settings Every deployment may have unique requirements and settings; however, the following thresholds and settings are particularly important for mongod and mongos deployments: -f (file size): unlimited -t (cpu time): unlimited -v (virtual memory): unlimited -n (open files): 64000 -m (memory size): unlimited -u (processes/threads): 64000 i.e open file and process ulimit (soft and hard) should be set to 64000. In the mongod init script (/etc/init.d/mongod), the start function sets process ulimit to 32000: \\# Recommended ulimit values for mongod or mongos \\# See http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings # ulimit -f unlimited ulimit -t unlimited ulimit -v unlimited ulimit -n 64000 ulimit -m unlimited ulimit -u 32000 Here is a link to git : https://github.com/mongodb/mongo/blob/400dabd20809c561d8de21438d4bb7c682129641/rpm/init.d-mongod#L60 While documentation recommends setting ulimit to 64000. It is possible this is a documentation bug. If so, please move to DOCS. Additionally, if /etc/security/limits.d/99-mongodb-nproc.conf file is created (as documentation recommends): mongod soft nproc 64000 mongod hard nproc 64000 mongod soft nofile 64000 mongod hard nofile 64000 Then the ulimit set by the init script will be run over by the ulimit of 99-mongodb-nproc.conf file, and the ulimit will be set to the recommended.
xgen-internal-githook commented on Wed, 6 May 2015 17:46:05 +0000: Author: {u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'} Message: SERVER-17780 Update init script process ulimit to match recommendations (cherry picked from commit 47f76710961fb5be17d92e26fb7452f8223afb9f) Branch: v2.6 https://github.com/mongodb/mongo/commit/d2cb8db14acb5dd47a0479583f962740520c5723 xgen-internal-githook commented on Wed, 15 Apr 2015 20:35:35 +0000: Author: {u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'} Message: SERVER-17780 Update init script process ulimit to match recommendations (cherry picked from commit 47f76710961fb5be17d92e26fb7452f8223afb9f) Branch: v3.0 https://github.com/mongodb/mongo/commit/7d85928481c882ef9061207020dc225d24d6c2ad xgen-internal-githook commented on Mon, 30 Mar 2015 17:02:39 +0000: Author: {u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'} Message: SERVER-17780 Update init script process ulimit to match recommendations Branch: master https://github.com/mongodb/mongo/commit/47f76710961fb5be17d92e26fb7452f8223afb9f