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

Be smarter about opening databases

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.6.5, 1.8.2
    • Component/s: MMAPv1, Storage
    • Labels:
      None
    • Storage Execution

      Copied from http://groups.google.com/group/mongodb-user/browse_thread/thread/a1b73e36b6be0b92 :

      When number of database grow large, mongod will spent very long time to start.
      I have about 23500 databases in dbpath, and starting mongod will spent about 45 mins.
      I read the source code of mongod and used strace to watch what mongod do while starting. I found that mongod open all databases to check the pdfile version while starting. When mongod open a database, it call "getDatabaseNames", and "getDatabaseNames" will call file stat for about N (N is the number of databases) times. So mongod will call stat about N * N times while checking the pdfile version of all databases. This will spent too long time.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: