Change snappy compression to zstd compression in Mongo Atlas for collections

Viewed 1048

I want to change Mongo Atlas snappy compression to zstd compression for a collection. How to achieve this in Atlas cloud.

1 Answers

The default compression used is snappy, but it is possible to change the compression for individual collections on creation using the following

db.createCollection("foo", {storageEngine: {wiredTiger: {configString: "block_compressor=zlib"}}})

The available options as of v4.4 are: snappy, zstd, zlib, and none

Related