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

Mongo databases fileSize grows without bound, even though total dataSize doesn't change

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Duplicate
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Operating System:
      Linux

      Description

      I have a mongod node which is using much more disk space than stored object space. On Wednesday, I --repair'd the database, which brought the storageSize down to ~dataSize, now storageSize is back to 44x the dataSize!

      In this case, dataSize is ~480Mb, storageSize is ~21Gb, and there are ~24Gb of database files.

      > db.stats()
      {
              "db" : "dbname",
              "collections" : 8,
              "objects" : 4729,
              "avgObjSize" : 101896.2233030239,
              "dataSize" : 481867240,
              "storageSize" : 21079039904,
              "numExtents" : 39,
              "indexes" : 11,
              "indexSize" : 1332688,
              "fileSize" : 25204097024,
              "nsSizeMB" : 16,
              "ok" : 1
      }

      I'll attach some python code that reproduces the problem.

        Attachments

        1. mongo_hammer2.py
          1 kB
        2. mongo_hammer.py
          2 kB

          Issue Links

            Activity

              People

              Assignee:
              sam.helman@10gen.com sam.helman@10gen.com
              Reporter:
              jblackburn James Blackburn
              Participants:
              Votes:
              3 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: