Massive random reads on a huge mongodb database but no cache misses? I do some performance testing for MonogDB. I have lots of RAM (2TB) and a database which is completely in RAM with 250GB, so for sure all indexes are too (actually there is only one on _id since I ycsb tests). 

But what can be the reason that I do see almost no cache misses? I would expect plenty since I have ycsb setup to randomly access the db with a recorccount of 1 000 000 ...  This can not fit into the cache even with L4 = 600 MB.....
My guess is that YCSB isn’t fetching the whole document. Like a covered query, so if all the data that it needs is delivered by the data in the index, you don’t have to get anything from disk, so no cache misses. Another factor is that any page evicted from WT cache would be in the FS cache, since WT on MongoDB only supports buffered I/O.

YCSB doesn’t really do a good job testing MongoDB performance. If you’re using the default workloads, e.g. workloada(50%query/50%updates) or workloadc(95%query/5%updates), as soon as your indexes are loaded in memory no data you will accessed on disk. By default YCSB is querying on _id and getting only one document per request. You could force YCSB to bring create a cursor with [x]thousand documents and make it iterate until the cursor is exhausted.  Here is the command if you wanna try it:

./YCSB/bin/ycsb -s -P ./YCSB/workloads/workloadc -p mongodb.url=“mongodb://192.168.13.101:27017,192.168.13.102:27017,192.168.13.103:27017/ycsb1” -p operationcount=120000000 -p maxexecutiontime=1800 -p readproportion=0 -p scanproportion=1 -p maxscanlength=8000 -threads 16