mongodb mysql资源占用_如何限制mongodb启动时占用过多内存
生活随笔
收集整理的這篇文章主要介紹了
mongodb mysql资源占用_如何限制mongodb启动时占用过多内存
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
默認情況下,mongodb占用的內存大小為:Starting?in?3.4,?the?WiredTiger?internal?cache,?by?default,?will?use?the?larger?of?either:
50%?of?RAM?minus?1?GB,?or
256?MB.
下面我們來看一下限制mongodb啟動時占用內存的方法:
新增配置文件 /etc/mongod.confstorage:
dbPath:?/var/lib/mongodb
journal:
enabled:?true
#??engine:
mmapv1:
smallFiles:?true
wiredTiger:
engineConfig:
configString?:?cache_size=160M
然后以配置文件的方式啟動:mongod?-f?/etc/mongod.conf?--fork?--logpath=/etc/mongodb.log
總結
以上是生活随笔為你收集整理的mongodb mysql资源占用_如何限制mongodb启动时占用过多内存的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python批量ping脚本_Pytho
- 下一篇: 网路工程师要不要学mysql_网络工程师