<!-- llms-explorer concept facts · https://llms-explorer.com/tree/wiredtiger-block-reuse-file-fragmentation-and-freestoragesize/ · pack 2026-10-31 · ~1317 tokens -->

# WiredTiger block reuse, file fragmentation and freeStorageSize

> Source-anchored research for WiredTiger block reuse, file fragmentation and freeStorageSize. Run status: COMPLETED.

Parent: [Atlas storage auto-scaling and disk reclaim via compact](https://llms-explorer.com/tree/atlas-storage-auto-scaling-and-disk-reclaim-via-compact/) · 3 facets · 15 facts · page: https://llms-explorer.com/tree/wiredtiger-block-reuse-file-fragmentation-and-freestoragesize/

## How it works

- collStats.freeStorageSize reports storage available for reuse. The scale argument changes its units, and the documented field can be absent when no storage is available for reuse. (low confidence) — [source](https://www.mongodb.com/docs/manual/reference/command/collStats.md)
- Compaction is best effort: block placement can prevent a file-size reduction even when reusable bytes remain. A successful command response alone does not establish that physical disk space was reclaimed. (high confidence) — [source](https://source.wiredtiger.com/develop/arch-compact.html)
- A collection compact operation covers the collection and its associated indexes. Because collection storageSize excludes indexes, that single metric is insufficient to describe the operation's complete storage footprint. (medium confidence) — [source](https://www.mongodb.com/docs/manual/reference/command/compact.md)

## Comparisons and alternatives

- Dropping a collection or index releases the disk space occupied by that object, unlike deleting individual documents while retaining the object's files. (high confidence) — [source](https://www.mongodb.com/docs/manual/faq/storage.md)

## Facts and statements

- Deleting documents leaves space inside WiredTiger data files available for later reuse; it does not generally return those bytes to the operating system. Logical data reduction therefore need not reduce filesystem usage. (high confidence) — [source](https://www.mongodb.com/docs/manual/faq/storage.md)
- The wiredTiger.block-manager statistic named "file bytes available for reuse" measures internal reusable space in bytes; it is not a measurement of filesystem free capacity. (high confidence) — [source](https://www.mongodb.com/docs/manual/faq/storage.md)
- storageSize includes allocated collection storage, including unused allocation, and reflects compression; it excludes indexes. totalSize adds totalIndexSize. Comparing logical size directly with storageSize is therefore not a reliable measure of WiredTiger free blocks. (medium confidence) — [source](https://www.mongodb.com/docs/manual/reference/command/collStats.md)
- WiredTiger retains blocks referenced by checkpoints. Replacing a page does not make its previous disk block reusable until the checkpoint referencing that block has been removed and checkpoint metadata has been resolved. (high confidence) — [source](https://source.wiredtiger.com/develop/arch-compact.html)
- Compaction can move live blocks from a file's end into reusable blocks near its beginning, then truncate the free tail. Interior holes are therefore potential relocation destinations, even though truncation itself occurs at the file end. (high confidence) — [source](https://source.wiredtiger.com/develop/arch-compact.html)
- Measure collection statistics before and after compaction and check filesystem disk usage as well. The collection statistics describe internal allocation; filesystem usage establishes whether space was actually returned. (medium confidence) — [source](https://www.mongodb.com/docs/manual/reference/command/compact.md)
- A compact operation covers both collection data and its associated indexes. A collection-only reusable-space statistic should not be treated as a complete prediction of the total bytes the operation will free. (medium confidence) — [source](https://www.mongodb.com/docs/manual/reference/command/compact.md)
- Percona's published PSMDB 6.0.14 experiment reported 306188288 reusable collection bytes before compaction, 34000896 afterward, and bytesFreed of 507662336 while inserts continued. These observations are a workload-specific example, not a universal conversion from reusable bytes to returned disk space. (low confidence) — [source](https://www.percona.com/blog/using-compact-in-percona-server-for-mongodb-from-version-4-4/)
- collStats.freeStorageSize reports storage available for reuse. Treat it as an internal free-space measure, not a guarantee that compact will return that many bytes to the operating system. (medium confidence) — [source](https://www.mongodb.com/docs/manual/reference/command/collStats.md)
- For a collection-level internal-free-space ratio, compare freeStorageSize with storageSize using consistent units. This ratio describes internal capacity; it does not describe where free blocks lie or guarantee a reclaimable-byte total. (medium confidence) — [source](https://www.alibabacloud.com/help/en/mongodb/use-cases/defragment-a-disk-to-improve-disk-usage)
- The WiredTiger architecture guide warns that its descriptions do not track every code change or necessarily apply to a specific release. Its compaction thresholds should not be presented as a universal MongoDB or Atlas service contract. (low confidence) — [source](https://source.wiredtiger.com/develop/arch-compact.html)
