-
Type: Task
-
Resolution: Incomplete
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
Environment:
*Location*: http://docs.mongodb.org/manual/reference/command/compact/
*User-Agent*: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/30.0.1599.114 Chrome/30.0.1599.114 Safari/537.36
*Screen Resolution*: 1920 x 1200
*repo*: docs
*source*: reference/command/compact
*Location*: http://docs.mongodb.org/manual/reference/command/compact/ *User-Agent*: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/30.0.1599.114 Chrome/30.0.1599.114 Safari/537.36 *Screen Resolution*: 1920 x 1200 *repo*: docs *source*: reference/command/compact
"compact requires up to 2 gigabytes of additional disk space while running. Unlike repairDatabase, compact does not free space on the file system."
...
Size and Number of Data Files
compact may increase the total size and number of your data files, especially when run for the first time. However, this will not increase the total collection storage space since storage size is the amount of data allocated within the database files, and not the size/number of the files on the file system."
After testing compact command, it seems it takes much more than 2GB additional space. We've tested it on 438GB partition with 90% capacity (part of 4 shards) and the compact was failed.
Please advise.
Thanks, Ofer