let's suppose that the machine has 100 GB of RAM and that a particular collection only has 10 GB of data.
That's only 10% of the total RAM.
So is it possible to configure this setup such that the entire collection is always cached on RAM, for performance of course?
EDITED:
based upon this documentaiong:
https://www.mongodb.com/docs/manual/core/wiredtiger/#memory-use
If the RAM is 100 GB, then by default MongoDB will use (100 - 1) / 2 = 49.5 GB of RAM as cache.
Since the collection is only 10 GB, will this essentially guarantee that 100% of the collection is 100% of the time cached in this allocated RAM space?