How to control size of journals in mongodb?

百般思念 提交于 2021-02-11 07:12:38

问题


How to control the size of large journals files as journal file take large amount of space. How can the space can be saved using small files.


回答1:


After doing some research:

Setting smallfiles option for controlling journaling doesn't control the size

However the command is --smallfiles




回答2:


Here are some ways to control journal file size,

  1. Use --smallfiles option in mongod which will use 128MB as max size of journal file instead of 1GB

  2. ulimit is way in unix to control system settings. It will allow you to set max. file size in system. Consider this when you have sharding in place.

  3. Reduce commitIntervalMs to a lower value i.e flush data to disk frequently. Use this option only when you can tolerate heavy IO load periodically.



来源:https://stackoverflow.com/questions/29632566/how-to-control-size-of-journals-in-mongodb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!