Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7022

File Descriptor Configuration for MongoDB Deployment

    • Type: Icon: Question Question
    • Resolution: Incomplete
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.3
    • Component/s: Sharding
    • None
    • Environment:
      Linux OEL

      Hi,

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

      According to mongodb the formula is:
      //TotalSize = `du -gs <db-path> | cut -f 1`

      1. = (TotalSizeGB/2) + (NumberOfDBs) + (max(maxConns, 20,000)) + 5%-overhead
        I calculated file descriptor value for my deployment using above formula. Calculation is:
      1. = (15 * 1024)/2 + 365*10 + 20,000 + 5% = 32896

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

      Since filesize in my case is 512 MB instead of 2048 MB(Default) so multiplying TotalSizeGB by 4:

      1. = (15 * 1024 * 4)/2 + 365*10 + 20,000 + 5% = 57088

      T&R,
      jitendra verma

            Assignee:
            barrie Barrie Segal
            Reporter:
            jitendra908 jitendra
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: