Umbra: A Disk-Based System with In-Memory Performance [pdf]
cidrdb.org
cidrdb.org
If general purpose programming languages could store the data efficiently in main memory, the feature set of in memory databases is not so high that you can’t roll your own incrementally. But your GC times are going to go nuts, and you’ll go off the rails.
If the speed of light governed data access, you’d collect your data locally and let the operating system decide which hot paths to keep in memory versus storage.
The last time network was faster than disk was the 1980’s, and we got things like process migration systems (Sprite). Those evaporated once the pendulum swung back.
This kind of workload is probably the most common in all of software development for the past couple of decades given how plentiful RAM is as well as most applications having some need for storing persistent data.
We only have problems with memcached when we create them ourselves. Disk backing store would soften that considerably.
I have a thing where the shards each have sub-shards in process and 1 go-routine per sub shard; communication to/from the remote callers is via channels to a per-request go-routine (or whatever it is gRPC does) and the main subs hard go-routine has no locking on itself. Just a big hash map and a DLL to implement an LRU so I have a hard cap on memory usage, and no allocations for lookups or mutations (just creations).
Another potential issue was that they compared their mmap code to fio O_DIRECT code, which kinda not clean experiment, fio could be just much more optimized itself..
Also worth mentioning LMDB, probably the fastest embedded K/V db in terms of read perf uses mmap.
Should I keep reading, or is the title misleading?
The abstract seems to say that the system provides memory-comparable performance for data that is... in-memory
The initial submission didn't reproduce successfully due to a segmentation fault in an attempt to restart it after data loading. But after some changes, it started to work and showed exceptionally good results.
So definitely compared against PostgreSQL, MariaDB it is significantly faster.
On par with lower-end Snowflake.
And Hyper is alive and well at Salesforce/Tableau! The team working on it is still in large parts the original Hyper team from TUM. You can actually download Hyper (as a binary with language bindings) and play around with it [2] for non-commercial use cases.
If you think Hyper/Umbra is cool, the TUM database group has lots of other very interesting projects going on at the moment. LingoDB [3] pushes the database-as-a-compiler idea to the extreme by implementing query optimization and compilation query compilation in MLIR. LingoDB is open-source. Also Viktor Leis, who stands behind (among many other things) Hyper's Morsel scheduling and ART indexes as well as Umbra's buffer management recently started a very interesting project [4] to heavily co-design the DBMS together with the OS in a unikernel approach. Really interesting stuff!
Disclaimer: I work on Hyper. Views are my own.
[1]: https://cedardb.com/ [2]: https://tableau.github.io/hyper-db/docs/ [3]: https://www.lingo-db.com/ [4]: https://www.cs.cit.tum.de/dis/research/cumulus/
Umbra, on the other hand, is a full fledged, ACID compliant relational database systems with all bells and whistles.
However, Umbra can process multiple 100ks of transactions per second. If you're interested in more details, take a look at Figure 6 in this research paper: https://db.in.tum.de/~freitag/papers/p2797-freitag.pdf
Disclosure: I work for CedarDB (https://cedardb.com), the commercial spinoff of Umbra.