how to release the caching which is used by Mongodb?

前端 未结 4 1578
无人共我
无人共我 2020-12-01 02:18

Mongodb use the Memory Mapped File ,when I use a long time , I see the free memory has left less by command \'free -m\' in ubuntu and the caching use a lot. Then kill the Mo

4条回答
  •  不知归路
    2020-12-01 03:05

    Starting in 3.2, MongoDB uses the WiredTiger as the default storage engine. Previous versions used the MMAPv1 as the default storage engine.

    With WiredTiger, MongoDB utilizes both the WiredTiger internal cache and the filesystem cache. In MongoDB 3.2, the WiredTiger internal cache, by default, will use the larger of either: 60% of RAM minus 1 GB, or 1 GB. For systems with up to 10 GB of RAM, the new default setting is less than or equal to the 3.0 default setting (For MongoDB 3.0, the WiredTiger internal cache uses either 1 GB or half of the installed physical RAM, whichever is larger). For systems with more than 10 GB of RAM, the new default setting is greater than the 3.0 setting.


    to limit the wiredTriggered Cache Add following line to .config file :

    wiredTigerCacheSizeGB = 1

提交回复
热议问题