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

Add option to listDatabases to only get db names, not size info

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.2.13, 3.4.3, 3.5.4
    • Storage
    • Linux yq131 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
      ext4 filesystem
    • Fully Compatible
    • v3.4, v3.2
    • Storage 2017-03-06

    Description

      I have about 29377 files (including datafile and nsfile), 13666 databases. The total size is about 1TB. The mongod started with parameters "smallfiles" and "noprealloc".
      When I run the command listDatabases, it takes too long on calculating "sizeOnDisk" and determining the empty of database, more than a hour sometimes. But I just need a list of database names. An option to not display size or empty probably makes sense.
      I found that mongod will receive the listDatabases command in the following cases:
      1. Dump all databases use mongodump
      2. A Member of replica set doing initialSync
      3. Add a new shard to a cluster.
      In these cases, listDatabases may cause mongod overload and can not do the normal queries.

      Attachments

        Issue Links

          Activity

            People

              geert.bosch@mongodb.com Geert Bosch
              elmerzhang Lei Zhang
              Votes:
              10 Vote for this issue
              Watchers:
              27 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: