In order to keep a heavily accessed collection consistently in cache, we attempted to make it cache-resident.
In several tests conducted in an environment with relatively moderate activity, the collection was never fully retained in cache. When large collections were loaded, it remained only partially in cache—even though it had previously been fully loaded.
In a more intensive environment, we observed that the collection did remain in cache, but over time, the amount of cache it occupied grew disproportionately—eventually reaching 2x and even 3x its original size.
According to the documentation (source.wiredtiger.com), a cache-resident collection should remain in cache and not be evicted. However, based on our observations, this doesn’t always appear to be the case.
Did we interpret this correctly—that such a collection should remain in cache? How can we explain the differing behaviors we observed across environments?
Mongo version: 6.0.16