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

Be smarter about opening databases

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 1.6.5, 1.8.2
    • MMAPv1, Storage
    • None
    • Storage Execution

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: