Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
twoskip does a full munmap/mmap for every transaction in foreach #5
Discovered by Variomedia AG when they upgraded to 2.5.8 from 2.4 series and used twoskip as the default mailboxes.db.
You can trivially see this on Linux as well with an strace:
Here's the interesting bit of the skiplist show under strace:
mmap(NULL, 16384, PROT_READ, MAP_SHARED, 5, 0) = 0x7f37c1856000
And the interesting bit of the twoskip show under strace:
mmap(NULL, 16384, PROT_READ, MAP_SHARED, 4, 0) = 0x7f1389e5f000
The fix will be to make lib/mappedfile.c less agressive about re-mmaping.