Parse has a unique issue -- they don't know how people are using the MongoDBs they provide. Most people relying on a Parse as a use case for managing their MongoDB will mostly read about how Parse tries to fix poor usage by their customers.
That being said, you shouldn't always be compacting. In fact, if you are having to compact regularly, it means you are using MongoDB inefficiently. The reasons your MongoDB may become "defragmented" are:
- Regularly deleting documents
- Updating documents and making the document larger continually (does not include atomic updates)
If you are regularly deleting documents, then you should consider using TTL or capped collections.
If you are updating documents and making the document larger (i.e. continuously extending an array), then you should consider redesigning schema to limit the unlimited document growth. Or, you can consider adding padding as placeholders for the future updates.
Either way, if you are having to compact regularly and often, it is a symptom of not using MongoDB correctly, and you should consider redesigning your schema. Compactions are blocking commands and on datasizes larger than a few gigs can take a while to complete.