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

Update GridFS chunk size default to 255k

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • v1.3.3
    • manual
    • 4
    • true

    Description

      This is being changed for 2.4.10 and 2.6.0-rc3. tyler@10gen.com'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

              sam.kleinman Sam Kleinman (Inactive)
              jmikola@mongodb.com Jeremy Mikola
              Jonathan Dahl Jonathan Dahl
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8 years, 14 weeks, 2 days ago