High Number of Open Files in MongoDB 7.0: Is 1 Million Normal?

Hello MongoDB Community,

I am currently running a MongoDB setup with the following configuration:

MongoDB Version: 7.0

Deployment: 3-node replica set (1 primary and 2 secondary replicas)

Databases: 2 databases

Collections: Over 110 collections in total, each with one index

I’ve recently noticed that the number of open files across my MongoDB deployment exceeds 1 million. While I understand that the number of open files can vary based on the workload and configuration, I am uncertain if this is expected for my setup or if it indicates a potential issue.

Questions:

  1. Is it normal for MongoDB 7.0 with my setup to have over 1 million open files?

  2. What factors typically contribute to a high number of open files in MongoDB, and how can I assess if my deployment’s file usage is optimized?

  3. Are there best practices for monitoring and managing file descriptor limits (ulimit) to ensure MongoDB runs smoothly without resource bottlenecks?

I would appreciate any insights, recommendations, or experiences that others might have with similar configurations.

Thank you for your help!