Actual classroom | MongoDB how to use the memory? Memory full how broken?

Recently received online case MongoDB and Community Advisory multiple aspects of memory, focused on:

  • Why do I use MongoDB XX GB of memory?
  • Mongod a deployment of multiple instances / processes on the machine, how WiredTiger cache should be configured?
  • Whether MongoDB SWAP space should be used to reduce the memory pressure?

MongoDB memory used where?

After Mongod process starts, in addition to the ordinary processes like loading binary, dependent on a variety of library into memory, as a DBMS, is also responsible for client connection management, request processing, database metadata, and many other storage engines work, which involve allocation and deallocation of memory, by default, MongoDB using Google tcmalloc as a memory allocator, the main bulk of the memory footprint is "storage engines" and "client connections and request processing."

Storage Engine Cache

MongoDB 3.2 and later, use the default

Guess you like

Origin yq.aliyun.com/articles/716024