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

usePowerOf2Sizes doc should state that power of two sizes are not always used when this mode is enabled

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual
    • None

    Description

      The usePowerOf2Sizes documentation states that "By setting usePowerOf2Sizes, you ensure that MongoDB will allocate space for documents in sizes that are powers of 2 (e.g. 4, 8, 16, 32, 64, 128, 256, 512...8388608)"

      <http://docs.mongodb.org/manual/reference/command/collMod/>

      However, when there is an allocation greater than >= 4mb the allocation will be quantized to a 1mb boundary not to a power of two size boundary.

      The relevant code is

      <https://github.com/mongodb/mongo/blob/5a16894d45d9236acb348e0d9d805320c08c294e/src/mongo/db/namespace_details.cpp#L833-L837>

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 50 weeks, 6 days ago