Search code examples
mongodbstoragemongodb-atlas

Understanding MongoDB storage size, logical data, vs database size, in MongoDB Atlas


We have a cluster with 100 GB storage, per the configuration for the cluster in mongodb atlas.

enter image description here

And the overview page for the cluster, it shows that 43.3 GB out of a 100 GB max are used.

enter image description here

Since the clusters configuration also has 100 GB storage selected, I am assuming the 100 GB of disc space is the same as the 100 GB available storage?

enter image description here

When we click into our database, it shows the database size is 66.64 GB + 3.21 GB indexes, for a total size of about 70GB.

What is the difference between the 100GB of available storage and disc, and the database size + index size of 70GB? Should we be concerned that the 70 GB is approaching 100GB, or is it only the 43.3 GB of disc usage that matters?

Edit Since I've posted this, MongoDB has removed database size, and replaced it with both storage size and logical data size, which further complicates this. In most instances, the logical data size is 3-4x the storage size.

enter image description here


Solution

  • Your mongodb database is using by default wiredTiger storage engine with snappy compression which mean that most probably your data stored on disk is using 43.3GB , but the actual(uncompressed) data size is ~ 70GB , so there is no place to worry about since you have used only 43.3% from your 100GB storage. Afcourse you need to monitor your data grow and if it is increasing faster you may need to allocate more space ...