Hey Guys,
I am working on a proof of concept of a simple key value store service using lmdb as the back end. I am using sendfile to avoid an extra copy. I accomplished this by creating function to extract get the mmap ptr from the env so I can calculate the offset of data.
I figured that function might be useful to the bigger community.
If it does not fit in the bigger vision of lmdb it is fine not to include it.
You will find the diff attached.
Thank you James
James Rouzier rouzier@gmail.com wrote:
Hey Guys,
I am working on a proof of concept of a simple key value store service using lmdb as the back end. I am using sendfile to avoid an extra copy.
Be careful if you're overwriting any data in LMDB.
zero-copy sendfile means any data queued up in the kernel will be subject to modifications as the underlying file is updated, so your client may se data it was not intended to see.
I wanted to do the same thing as you last year but ended up writing a patch to the sendfile manpage instead:
https://git.kernel.org/cgit/docs/man-pages/man-pages.git/patch?id=7b6a329977...