The mmap pattern
john.freml.in
The mmap pattern
1–10 of 48 posts
Re: The mmap pattern
#2However, it is insanely fast when it works.
Re: The mmap pattern
#3I did this for a high-performance time sequence database of robot activity. It's pretty hard. You need custom data structures for everything (no STL), adding fields to the data structures requires a schema migration tool, and it's easy to have subtle bugs around things like hash table growth. However, it is insanely fast when it works.
Re: The mmap pattern
#4https://code.google.com/p/codesearch/source/browse/index/mma...
Re: The mmap pattern
#5Re: The mmap pattern
#6I did this for a high-performance time sequence database of robot activity. It's pretty hard. You need custom data structures for everything (no STL), adding fields to the data structures requires a schema migration tool, and it's easy to have subtle bugs around things like hash table growth. However, it is insanely fast when it works.
Re: The mmap pattern
#7I did this for a high-performance time sequence database of robot activity. It's pretty hard. You need custom data structures for everything (no STL), adding fields to the data structures requires a schema migration tool, and it's easy to have subtle bugs around things like hash table growth. However, it is insanely fast when it works.
Re: The mmap pattern
#8You do not need to call mmap directly, because malloc() will do it if your allocation exceeds MMAP_THRESHOLD (usually on the order of a megabyte). So you get this optimization "for free"--the only important part is that you do not call malloc() for each tiny object.
Re: The mmap pattern
#9LMDB is at the heart of the ubiquitous LDAP ( OpenLDAP ) and is very well optimized ( look at his benchmarks ). Now they are optimized for reading, which is important.
I would imagine mmap-ing with large amount of write will result in unpredictable performance....
Re: The mmap pattern
#10For a while I've wanted a nice C library for an mmapped heap with allocation and common data structures (and maybe locks?) - all the usual stuff you'd expect in a standard library, but with support for relative offsets instead of pointers, crash robustness, introspection, and other features required to work well with a persistent file. I do not know any library of this type that currently exists.
"This library also supports distributed, durable, observable collections (Map, List, Set)" "It uses almost no heap, trivial GC impact, can be much larger than your physical memory size (only limited by the size of your disk) and can be shared between processes with better than 1/10th latency of using Sockets over loopback."