Logical Storage of the mongo cluster

I recently reindexed a collection in my MongoDB Atlas cluster. The index size dropped significantly — from ~35 GB down to ~11 GB (a reduction of more than 20 GB). However, the logicalDataSize metric reported by the system remains around 60 GB, both before and after the reindexing.

My questions are:

  1. Why doesn’t the logicalDataSize decrease when index size is reduced?
  2. What is the relationship between:
  • logicalDataSize (Atlas metric)
  • storageSize (on-disk size reported by db.stats() / WiredTiger)
  • index sizes (as reported by db.collection.stats())
  1. Does reindexing only compact index files without impacting the logical data size metric?
  2. Are there any operations (e.g., compact, repairDatabase, or automated Atlas maintenance) that would reclaim disk space and actually reduce the reported data size?

Any insights into how MongoDB Atlas tracks data vs. index size would be greatly appreciated.

Reindexing reduces index size but won’t change logicalDataSize since that tracks uncompressed doc size. To shrink disk usage you’d need compact or repairDatabase. A similar case was discussed here: Disk space usage larger than expected.