How to enable compression in WiredTiger storage engine

187 views
Skip to first unread message

yuya...@gmail.com

unread,
Dec 16, 2015, 9:52:19 PM12/16/15
to mongodb-user
Hi,

I get the mongodb sources from github, and switch to v3.2 branch, I want to try the compression for WiredTiger.

After launching mongod with default configurations, I saw the message printed on console shows the storage engine is WiredTiger, and both Journal and Collection will use snappy as their compressor.

However, I cannot see any code in the mongo folder will call snappy to do (de)compression, only the code in third_parity/wiredtiger will do that, will the third_party of wriedtiger be used?

I also tried to disable compression, and load some data with YCSB, there's no db size change with/without compression, so I doubt whether compression is enabled or not ?

It would be great if someone could help me on that, or any comment is highly appreciated thanks a lot.

Thanks
-Yu

Rhys Campbell

unread,
Dec 17, 2015, 2:11:27 AM12/17/15
to mongodb-user
Details on how to change the compression level can be found here https://www.mongodb.com/blog/post/new-compression-options-mongodb-30

Look for the  -- wiredTigerCollectionBlockCompressor option. This can also be specified on the collection level.

Reply all
Reply to author
Forward
0 new messages