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.....

  • 1
    If everything is in RAM, why look for cache misses ??? If you are using the memory engine for MongoDB, is there such a thing as a cache miss ??? The only reference to a cache I have ever seen for it was "WT_CACHE_FULL: operation would overflow cache" as an error message. I am a MySQL DBA, so forgive me if this is a rookie question. – RolandoMySQLDBA Jan 4 '18 at 21:18

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://,,” -p operationcount=120000000 -p maxexecutiontime=1800 -p readproportion=0 -p scanproportion=1 -p maxscanlength=8000 -threads 16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.