Hi @Aayushi_Mangal,
Thanks for link reference and detailing the test information you performed ![]()
I had inserted about 500K test documents into a MongoDB version 4.2.21 instance with default compression and then mongorestore the dump of this same data to several test instances with varying compressions:
- MongoDB version 5.0.10 zstd compression level 22
- MongoDB version 5.0.10 zstd compression level 10
- MongoDB version 5.0.10 default compression
The results are here below (for all the below tests please take note of the decreasing storageSize values):
MongoDB version 4.2.21, default compression:
ns: 'compressdb.compresscoll',
size: 767500000,
count: 500000,
avgObjSize: 1535,
storageSize: 64327680
MongoDB version 5.0.10 default compression:
ns: 'compressdb.compresscoll',
size: 767500000,
count: 500000,
avgObjSize: 1535,
storageSize: 54767616
MongoDB version 5.0.10 zstd compression, level 10:
ns: 'compressdb.compresscoll',
size: 767500000,
count: 500000,
avgObjSize: 1535,
storageSize: 27152384
MongoDB version 5.0.10 zstd compression, level 22:
ns: 'compressdb.compresscoll',
size: 767500000,
count: 500000,
avgObjSize: 1535,
storageSize: 1257472
For case 2 in your reply within this post:
- we inserted bulk fresh dummy data in all these mongo, but found no difference in compresion.
Could you run a db.collection.stats() on each of your test cases / instances and advise the following values for each test instance:
storageSizecreationString
Regards,
Jason