Limit opened file descriptors used by mongodb server?

64 views
Skip to first unread message

Andrzej Janicki

unread,
Jun 15, 2016, 1:33:33 AM6/15/16
to mongodb-user
Is there any way to make mongodb server to limit opened file descriptors? I'm using wiredtiger engine and server opens at least 2 descriptors per collection. It looks like it's opened on server start or collection creation and never closed. Documentation has no configuration parameter for file descriptors.

Kevin Adistambha

unread,
Jun 27, 2016, 10:20:33 PM6/27/16
to mongodb-user

Hi Andrzej,

Is there any way to make mongodb server to limit opened file descriptors? I’m using wiredtiger engine and server opens at least 2 descriptors per collection. It looks like it’s opened on server start or collection creation and never closed. Documentation has no configuration parameter for file descriptors.

That is correct. WiredTiger will open one file per collection and per index. Since each collection will have its _id filed indexed automatically, WiredTiger will open at least 2 files per collection. Please see the Resource Utilization page for more details.

Currently, there is no setting that can limit the file descriptors used by MongoDB. Depending on the applicability on your use case, you could either limit the number of collection (which could negatively impact your application’s use case), or limit the number of indexes per collection (which could negatively impact performance). What is the reason for limiting MongoDB file descriptor usge? Is there any issue that you observed due to the number of files opened by MongoDB?

Best regards,
Kevin

Reply all
Reply to author
Forward
0 new messages