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

Compact doesn't free space

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • 4.0.3
    • None
    • WiredTiger
    • None
    • ALL

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: