Some Confusions about mongodb3.4 Memory

  mongodb, question

Hello, everyone, I have a question that I would like to ask you for help.
We upgraded mongodb to 3.4.6 some time ago. We delete historical data every day. The database only stores data for a few days, and the amount of data is not large.
scm:PRIMARY> show dbs
admin 0.000GB
local 15.234GB
scm 4.198GB
scm:PRIMARY>
Including the oplog in local, the total is only 20G.
But looking at the memory situation through top and mongodb’s own commands, we found that it was much more than 20G.
View via db.serverstatus (). wiretiger.cache.

"bytes belonging to page images in the cache" : 27709364089,
 * * "Bytes Currently in the Cache": 85890560448,--about 80G**
 "bytes not belonging to page images in the cache" : 58181196359,
 "bytes read into cache" : 51861301488,
 "bytes written from cache" : NumberLong("4133625131732"),
 * * "Maximum Bytes Configured": 107374182400,-Sets the maximum inner memory wiredTigerCacheSizeGB=100**
 "maximum page size at eviction" : 4481266,

View via db.serverStatus().mem

* * "resident": 106492,-approximately 106G should be file system cache=106-80=24G**
 "virtual" : 112000,

Question 1: What data does 80g inner cache contain? I know there are hot data and indexes (now, even if all the data is put into memory, including oplog, it is only 20G). Is there still oplog in memory?
Question 2: innercache can set the maximum size through the wiredTigerCacheSizeGB parameter. is there any way to limit the size of file system cache? now it seems that this file system cache is very large and what data is mainly stored in it

  1. Oplog is a common capped collection in MongoDB. for the storage engine, oplog is only a part of common data. Therefore, the oplog should be stored in memory when the replication set is started, because the oplog will be replayed frequently to achieve the effect of data synchronization.
  2. The second question is to be answered by Daniel.