I'm so excited that they finally open-sourced this. It's relatively old tech at Yahoo, stuff folks outside never got to see. It was difficult to explain to later colleagues the stuff I knew about shared-memory databases because I couldn't give them a frame of reference.
mdbm performance is even better on FreeBSD than Linux because FreeBSD supports MAP_NOSYNC, which causes the kernel not to flush dirty pages to disk until the region is unmapped. Perhaps mdbm's release will finally get the Linux kernel team to provide support for that flag.
Same here. I remember wishing we could Open Source it back in the early 2000s. Good to see this coming out so people can take a little credit for work they did back in the day.
mdbm uses a file-backed mmap region so you're implicitly saying you do want some sort of persistence. Also, mlock locks the heap in RAM to keep it from being swapped - mdbm's regions aren't heap space.
There's a mmap flag on Linux called MAP_LOCKED but I'm not sure how it behaves with MAP_SHARED, which mdbm uses (the man page isn't clear).
mdbm performance is even better on FreeBSD than Linux because FreeBSD supports MAP_NOSYNC, which causes the kernel not to flush dirty pages to disk until the region is unmapped. Perhaps mdbm's release will finally get the Linux kernel team to provide support for that flag.