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

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.2.1
    • Component/s: None
    • None
    • Linux

      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.

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

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

              Created:
              Updated:
              Resolved: