[DOCS-9714] Clarify operation of compact command with WiredTiger Created: 03/Jan/17  Updated: 30/Oct/23  Resolved: 04/Dec/17

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

Type: Bug Priority: Major - P3
Reporter: Bruce Lucas (Inactive) Assignee: Kevin Adistambha
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DOCS-9301 Update to repairDatabase documentation Closed
is related to DOCS-9267 WiredTiger Space Requirements & Behav... Closed
Participants:
Days since reply: 6 years, 10 weeks, 3 days ago

 Description   

The compact command doesn't free wasted space due to fragmentation under WiredTiger. I think this isn't clear from the documentation. Two suggested places to change:

Rewrites and defragments all data and indexes in a collection. On WiredTiger databases, this command will release unneeded disk space to the operating system.

Clarify that the "defragments" only applies to mmapv1, not to WT.

On WiredTiger, compact will rewrite the collection and indexes to minimize disk space by releasing unused disk space to the system. This is useful if you have removed a large amount of data from the collection, and do not plan to replace it.

Re-iterate that it may not reclaim unneeded disk space due to fragmentation.



 Comments   
Comment by Githook User [ 04/Dec/17 ]

Author:

{'username': 'kevinadi', 'email': 'kevinadi@gmail.com', 'name': 'Kevin Adistambha'}

Message: DOCS-9714 Clarify operation of compact command with WiredTiger
Branch: master
https://github.com/mongodb/docs/commit/06df5691a5dd0197df46ba3522c7270392665524

Comment by Allison Reinheimer Moore [ 03/Jan/17 ]

To Kay for grooming, since it's somewhat related to DOCS-9301 which also addresses reclaiming disk space and WT considerations.

Comment by Keith Bostic (Inactive) [ 03/Jan/17 ]

WiredTiger's compact command will help with fragmentation in some workloads.

I think we're being too wordy ("rewrites and defragments" is an implementation detail).

I don't know how mmapv1 compaction works, but for WiredTiger I would suggest:

Attempts to compact underlying storage for the data and indexes in a collection, releasing unneeded disk space to the operating system.

and

On WiredTiger, attempts to compact underlying storage for the data and indexes in a collection, releasing unneeded disk space to the operating system. The effectiveness of this operation is workload dependent and no disk space may be recovered.

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