Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2991

Update GridFS chunk size default to 255k

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v1.3.3
    • Component/s: manual
    • Last comment by Customer:
      true
    • Actual Time:
      4

      Description

      This is being changed for 2.4.10 and 2.6.0-rc3. Tyler Brock's explanation:

      Now that the server uses power of 2 by default, if the default chunk size for gridfs is 256k we will almost always be throwing away some storage space. This is because if the bindata field of a chunk will occupy 256k (an exact power of 2), then _id and foreign key reference to the files collection, etc will take up additional space that will cause the document's allocated storage to be rounded up to 512k (the next power of 2). This would be a huge waste.

      Instead, if we make the default chunk size 255k then we have an extra 1k to store the _id and other metadata so that when the document is persisted we round up to 256k and not 512k upon persisting the document.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sam.kleinman Sam Kleinman (Inactive)
              Reporter:
              jmikola Jeremy Mikola
              Participants:
              Last commenter:
              Jonathan Dahl Jonathan Dahl
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                7 years, 30 weeks ago
                Date of 1st Reply: