I am using MongDB 2.4.9 and working on performance tunung. With reference to the ulimit settings for mongodb, in my linux environment (ubuntu 12.04) the default setting for ulimit -s is 8192. MongoDB does not specify any default value for ulimit -s (stack-size). However this case study suggests to set stack-size to 1024. How does the default stack-size 8291 impacts mongodb performance. Does changing this value to 1024 help to reduce connection per overhead in order to improve performance?

1 Answer 1


The default stack size for MongoDB is already 1024, not 8192 (it is set in the code, not as a system setting) and has been since version 1.8.3 (see SERVER-2707), so you are already seeing the benefits of a lower stack size.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.