It looks like the compact command will create a new extent, at least if there isn't an extent on the free list. For large collections, the new extents will be large and usually require a new datafile to be allocated every time compact is run.
Experimentally I've run several compact commands back to back and seen a new file get allocated every or almost every time. This was after hitting the max file size, and it seemed like compact was creating a new extent rather than reusing a free list extent in this case.
- related to
-
SERVER-4446 Does not reuse allocated disk
- Closed