How to Release Memory Better in mongodb

  mongodb, question

Mongodb has been used for a long time, and its memory usage will continue to rise. It is not very good to close the database to release memory. What is the better way to release the memory occupied by mongodb?

The data in memory are all hot data. You have freed up memory. Although you have reduced memory usage, you have sacrificed some access performance.
What needs to be done is to optimize the performance. Not just to free up memory.
There are many ways to optimize. At the hardware level, ssd, machine (slice) and memory can be added. At the software level, we can analyze which are accessed at high frequency, which are bulky and which are time-consuming operations. Separate treatment.

First analyze the hardware performance, then analyze mongo itself. Where is the uneven hammer?
Mongo analysis tools include:mongostatdb.currentOP()sh.status()db.status().