Mongodb – Mongo 2.6 vs. 3.2 – data folder size

mongodb

I just migrated from Mongo 2.6 (Single node) to 3.2 (ReplicaSet).

In the old server the Mongo's data folder was a total of ~12GB, but looks like in the new servers (master and its slave) it's just ~2.5GB – make sense? Has Mongo enhanced the way they're holding data?

The size I mention above, ~12GB includes indexes (that have significant size in my DB, almost double it).

Best Answer

You've seen the right behaviour since the default storage engine in 3.2 is WiredTiger(WT). The Wired Tiger provides up to 80% of the data compression to your data.

Just to verify please note db stats before migrating and then after migrating the dbs to 3.2 to ensure you have got your data back.