Alexandra (Sasha) Fedorova
1 min readDec 20, 2019

--

Hi Elad,

Thank you for your comments.

I think your first question could be answered if we see how much of the access time in the mmap case is used on page faults vs. everything else. If you look back to the story, you’ll see that with my MAP_POPULATE trick I determined that the cost of page faults during the experiment was about 36%. Each page was accessed only once and so each access was a page fault, and still we saw 2–6x improvement.

Question 2: fair enough. Thanks for bringing this up.

Question 3: The benchmarks used in this story are very simple and they do not look at this case, but I did implement what I suggested at the end of the story in MongoDB’s storage engine WiredTiger, which brings us to your fourth question. I ran about a couple dozen workloads on WiredTiger and did not see any degradation from using mmap, only performance improvements (up to 50%). There are also a few academic papers on the subject showing similarly positive results.

Thank you, again, for reading and for your comments. Happy to chat.

--

--

Alexandra (Sasha) Fedorova
Alexandra (Sasha) Fedorova

Written by Alexandra (Sasha) Fedorova

I research computer systems, raise young scientists and consult in the area of systems performance. I am a professor at the University of British Columbia.

No responses yet