[DOCS-1025] usePowerOf2Sizes doc should state that power of two sizes are not always used when this mode is enabled Created: 22/Jan/13  Updated: 30/Oct/23  Resolved: 12/Feb/13

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Aaron Staple Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 10 years, 50 weeks, 6 days ago

 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>



 Comments   
Comment by auto [ 28/Feb/13 ]

Author:

{u'date': u'2013-02-28T14:59:05Z', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1025 clarification about usePowerOf2Sizes and capped collections
Branch: master
https://github.com/mongodb/docs/commit/6a541e45016389b0a2cbae5018a5e171c248cd17

Comment by auto [ 28/Feb/13 ]

Author:

{u'date': u'2013-02-28T14:59:05Z', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1025 clarification about usePowerOf2Sizes and capped collections
Branch: v2.2
https://github.com/mongodb/docs/commit/bb61190541c8a5084bf4f92b85d31dd10c3ae5f0

Comment by Scott Hernandez (Inactive) [ 28/Feb/13 ]

We should note that in capped collections they won't apply either: SERVER-8665

Comment by auto [ 28/Feb/13 ]

Author:

{u'date': u'2013-02-27T21:04:52Z', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1025 removing comment block from 2.4 doc
Branch: master
https://github.com/mongodb/docs/commit/8fa1952f186cff81111fbd50fff768147c37aea3

Comment by auto [ 12/Feb/13 ]

Author:

{u'date': u'2013-02-12T00:39:36Z', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1025: prep for pre-2.4
Branch: master
https://github.com/mongodb/docs/commit/3e17dae0dd57e2fc98ae5e339cecdffa61ce5491

Comment by auto [ 12/Feb/13 ]

Author:

{u'date': u'2013-02-12T00:13:57Z', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1025: clarifying usePowerOf2Sizes for records larger than 4 megabytes
Branch: master
https://github.com/mongodb/docs/commit/20fd29ace0545e689bbaf32aee94b5243e59b072

Generated at Thu Feb 08 07:40:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.