Mongodb optimization?

  mongodb, question

Now the scene is: the performance of the machine is very nb cpu. I7 Forget Model. Nb means that the cpu operates very little almost when querying. According to htop. However, the memory is not good, only 8g, after which the memory will definitely be increased. The hard disk is also a common mechanical disk, which will be changed later, but that is a later thing. What we can feel now is that when the query data is more than 100,000, the bottleneck appears on io, io is locked, and the memory occupancy is also high. It causes other operations to be very difficult. Although this effect is small, it is reflected in the long waiting time of pages in the aspect of web.
At present, the following optimizations have been made:
1. adjust the linux stack size value.
2, establish index.
3. Set up a separate collection of data that are relatively popular and have not been modified recently (1 month).
Through the above three to optimize, the situation is better. However, there will still be problems. When there are multiple conditions in the query, the index will be invalid. The situation is still the same.
Therefore, it is very contradictory. How can it be handled well? If there is another server with the same configuration, can this situation be solved through operations such as fragmentation?

Thank you

MongoDB, optimization can be 1. add memory; 2. Add more memory; 3. Plug in the maximum memory of the motherboard.

Redis+mysql solution can be considered.