Skip to content

Commit e7053bf

Browse files
committed
DOCS-685 add powersof2 sentence from Dan
1 parent 8d621ab commit e7053bf

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

source/core/write-operations.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,10 @@ padding for new inserts and moves.
364364
.. versionadded:: 2.2
365365
You can use the :dbcommand:`collMod` command with the
366366
:collflag:`usePowerOf2Sizes` flag so that MongoDB allocates document
367-
space in sizes that are powers of 2. As with all padding, using
368-
powers of 2 minimizes, but does not eliminate, document movements.
367+
space in sizes that are powers of 2. This helps ensure that the
368+
space freed due to either deletions or document relocations is
369+
reused efficiently. As with all padding, using powers of 2
370+
minimizes, but does not eliminate, document movements.
369371

370372
To check the current :stats:`paddingFactor` on a collection, you can
371373
run the :dbcommand:`db.collection.stats()` command in the

source/faq/developers.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,9 @@ grow on subsequent writes. You can change the default
678678
:stats:`paddingFactor` calculation by using the the
679679
:dbcommand:`collMod` command with the :collflag:`usePowerOf2Sizes`
680680
flag. The :collflag:`usePowerOf2Sizes` flag ensures that MongoDB
681-
allocates document space in sizes that are powers of 2.
681+
allocates document space in sizes that are powers of 2, which helps
682+
ensure that the space freed due to either deletions or document
683+
relocations is reused efficiently.
682684

683685
However, in those exceptions where you must pad manually, you can use
684686
the strategy of first adding a temporary field to a document and then

0 commit comments

Comments
 (0)