My new plan is to add a new replica set member with enabled snappy
compression and instead of copying the big collection, I would copy all
other collections (which are much smaller) to new collections with disabled
compression. Not perfect, since I have to disable compression for every new
collection, but may be a way to handle the problem.
May I ask why you want to turn off compression for some of the collections?
Why not just use Snappy compression (the default in WiredTiger engine
<https://docs.mongodb.org/manual/core/wiredtiger/#compression>) for all the
collections instead? Snappy requires relatively low CPU resources, but
provides a reasonable level of compression. Compressed data has the
advantage of lowering disk usage (since there’s less data to transfer) and
more efficient memory use in general. Also, if a document cannot be
compressed, Snappy will store it uncompressed. Please see the Snappy page
<https://google.github.io/snappy/> for more information.
If your use case allows it, I would recommend to use Snappy compression for
all collections, since the benefits (lower disk usage, more efficient
memory usage) generally outweighs the drawbacks (sightly higher CPU
utilization). Another benefit for your case is that you don’t need to
micromanage collection-level specific settings.
You received this message because you are subscribed to the Google Groups "mongodb-user"