When your mongod process is running, it has no data in resident memory. Data is then uploaded as it is accessed. Given that your collection fits in memory (here and here), you can run a touch command on it. On Linux, this will call the readahead system call to pull your data and indexes into the file system cache, making it available in memory for mongod. On Windows, mongod will read the first byte of each page, pulling it into memory.
If your collection + indexes do not fit in memory, only the tail of the data will be available, which can be accessed at the time of the touch.
source share