Store mongodb data in compressed format

后端 未结 3 970
耶瑟儿~
耶瑟儿~ 2021-01-05 02:30

I am using mongodb to store raw HTML data of web pages using scrapy framework. In one day of web scraping 25GB disk space is filled up. Is there a way to store raw data in c

3条回答
  •  没有蜡笔的小新
    2021-01-05 03:18

    Starting with 2.8 version of Mongo, you can use compression. You will have 3 levels of compression with WiredTiger engine, mmap (which is default in 2.6 does not provide compression):

    • None
    • snappy (by default)
    • zlib

    Here is an example of how much space will you be able to save for 16 GB of data:

    enter image description here

    data is taken from this article.

提交回复
热议问题