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

Compact doesn't free space

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.3
    • Component/s: WiredTiger
    • None
    • ALL

      I'm using MongoDB 4.0.3 with WiredTiger engine in LXD container over ZFS filesystem. 

      > db.runCommand({compact: "fs.chunks"})
      { "ok" : 1 }
      > db.stats()
      {
          "db" : "test",
          "collections" : 3,
          "views" : 0,
          "objects" : 20633515,
          "avgObjSize" : 8189.559693828221,
          "dataSize" : 168979402786,
          "storageSize" : 458719870976,
          "numExtents" : 0,
          "indexes" : 8,
          "indexSize" : 3488063488,
          "fsUsedSize" : 464063299584,
          "fsTotalSize" : 578740813824,
          "ok" : 1
      }
      > db.runCommand({compact: "fs.chunks"})
      { "ok" : 1 }
      > db.stats()
      {
          "db" : "test",
          "collections" : 3,
          "views" : 0,
          "objects" : 20633519,
          "avgObjSize" : 8189.558252617985,
          "dataSize" : 168979405807,
          "storageSize" : 458719866880,
          "numExtents" : 0,
          "indexes" : 8,
          "indexSize" : 3488063488,
          "fsUsedSize" : 464064217088,
          "fsTotalSize" : 578740813824,
          "ok" : 1
      }
      

      As you can see, DB didn't release unneeded space.

            Assignee:
            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            Reporter:
            lisio Andrey Kostin
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: