How can MongoDB dataSize be larger than storageSize?

前端 未结 2 1128
渐次进展
渐次进展 2021-01-02 01:08

As far as I understand, the storage size for MongoDB should always be larger than data size. However, after upgrading to Mongo 3.0 and using WiredTiger, I start seeing that

2条回答
  •  梦毁少年i
    2021-01-02 01:34

    MongoDB 3.0 with WiredTiger engine uses 'snappy' compression by default. If this affects your DB performance, you can consider to turn it off (blockCompressor: none) in the mongod.conf file:

    storage:
      engine: wiredTiger
      wiredTiger:
        collectionConfig:
          blockCompressor: none
    

提交回复
热议问题