Peek into WiredTiger Cache
WiredTiger is the default storage engine starting in MongoDB v3.2. In the diagram below, the red arrows show the flow of data through compression/decompression steps among the WiredTiger cache, file system cache and data files. Ideally, if all data, including indexes, can fit into the WiredTiger cache, accessing documents would be more efficient than having to access disk files frequently. In reality, memory resources are shared to support other tasks such as file system cache, user connections, and database operations, for example, sorting. At startup, if the WiredTiger cache size is not defined, the maximum memory allocated to the WiredTiger cache size is about a little less than 50% of the RAM. When experiencing performance degradation, users always intend to tune the WiredTiger cache size. It is recommended to use the default value unless you have a small working set that can possibly fit into WiredTiger cache or the compressed data size can fit into file sy...