News for hackers. Stuff that matters.
Re:Symas Lightning Memory-Mapped Database (LMDB) by justin66 on Sunday May 11, 2014 @01:54PM (#7729317)
Recently deleted from Wikipedia as being not notable by a former Oracle employee.

http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion...

edit: that page refers to a deletion that happened a year ago but lmdb had a page much more recently than that - even a month or two ago, I think - so apparently deleting the lmdb page is a hobby for someone. I'm not familiar enough with the tools to dig in and figure out what's going on there.

Re:Symas Lightning Memory-Mapped Database (LMDB) by sitkack on Monday May 12, 2014 @01:45PM (#7734226)
http://en.wikipedia.org/wiki/User:ThurnerRupert/Lightning_Me...

This is a problem with wikipedia in general. I think archive.org is/should be archiving dumps.

Re:Symas Lightning Memory-Mapped Database (LMDB) by sitkack on Sunday May 11, 2014 @04:04PM (#7729761)
On mobile, maybe check the deletopedia
Re:Symas Lightning Memory-Mapped Database (LMDB) by mitchellh on Sunday May 11, 2014 @11:32AM (#7728913)
As a data point, this is the underlying data storage mechanism we use for Consul (https://github.com/hashicorp/consul).

We also forked and improved some Go bindings to lmdb: https://github.com/armon/gomdb (which is the lib we use in Consul).

When building Consul, we were specifically looking for an in-process DB that supports MVCC. The reason is because while Consul is doing a snapshot, we wanted to be able to INSERT/UPDATE without affecting the integrity of the snapshot. LMDB fit this role nicely and the performance has been fantastic for our use case.

Re:Symas Lightning Memory-Mapped Database (LMDB) by joshu on Sunday May 11, 2014 @12:42PM (#7729106)
What is the difference between consul and serf? The top-level explanation is very similar.
Re:Symas Lightning Memory-Mapped Database (LMDB) by jdf on Sunday May 11, 2014 @10:47PM (#7730983)
Re:Symas Lightning Memory-Mapped Database (LMDB) by pkieltyka on Sunday May 11, 2014 @11:20PM (#7731051)
thats interesting! since Consul / Serf are written in Go.. have you considered using boltdb? https://github.com/boltdb/bolt it's an LMDB implementation in Go, really clean code.
Re:Symas Lightning Memory-Mapped Database (LMDB) by hyc_symas on Monday May 12, 2014 @01:34PM (#7734151)
Bolt is still a lot slower than LMDB/GoLMDB. http://eagain.net/talks/go-nuts-and-bolts/slides.html#33

And still very immature.

Re:Symas Lightning Memory-Mapped Database (LMDB) by ddorian43 on Sunday May 11, 2014 @12:29PM (#7729073)
Hustle is a distributed, column oriented, relational OLAP Database that uses lmdb.

http://chango.github.io/hustle/

Re:Symas Lightning Memory-Mapped Database (LMDB) by pdq on Sunday May 11, 2014 @02:21PM (#7729392)
Howard Chu, the author of LMDB, gave a great presentation on LMDB: http://parleys.com/play/517f58f9e4b0c6dcd95464ae/chapter0/ab...

He can also rock the violin.

Re:Symas Lightning Memory-Mapped Database (LMDB) by rdtsc on Sunday May 11, 2014 @11:27AM (#7728901)
Benchmarks are very impressive:

http://symas.com/mdb/microbench/

Multi-threaded, vs memcache

http://symas.com/mdb/memcache/

Re:Symas Lightning Memory-Mapped Database (LMDB) by lafar6502 on Sunday May 11, 2014 @11:31AM (#7728909)
Pls remember this database has no write ahead log and therefore is not too fast for write-intensive applications. But i really like it and regret I learned about it only recently.

PS and read the benchmark description carefully - some of the benchmarks are performed in memory, without actual disk i/o.

Re:Symas Lightning Memory-Mapped Database (LMDB) by _wmd on Sunday May 11, 2014 @12:53PM (#7729134)
This is only part of the story - LMDB lacks a WAL because it uses shadow paging, which is a complementary technique with totally different characteristics more suited to read-optimized loads.

Similarly "not too fast for write-intensive apps" is only half the story - LMDB write transactions have a fixed cost related to the tree depth, so while many tiny updates may incur a noticeable fixed penalty in some cases, that cost becomes less noticeable e.g. with larger transactions performing reasonably localized updates (say, to partially sequential key ranges).

Also note even for huge databases, the write overhead of shadow paging is usually somewhere south of 64kb per transaction. To reiterate, the fixed cost is essentially per-transaction rather than per-update.

Re:Symas Lightning Memory-Mapped Database (LMDB) by hyc_symas on Monday May 12, 2014 @01:28PM (#7734106)
For some write-intensive applications it is faster than everything else. E.g. http://symas.com/mdb/hyperdex/

Depends a lot on your key and value sizes - the larger the values, the faster LMDB is vs any other solution, due to the zero-copy behavior.

Re:Symas Lightning Memory-Mapped Database (LMDB) by lafar6502 on Wednesday May 21, 2014 @04:44PM (#7780669)
_wmd, hyc_symas I understand the principles of LMDB operation, the worst case scenario is lots of random writes that hit random pages in the db file. In such case the I/O will be heavy and random also, which leads to bad performance of disk operations (not so bad with SSD ,though). But you're right, if you avoid the worst case LMDB shines.
Re:Symas Lightning Memory-Mapped Database (LMDB) by hyc_symas on Thursday May 22, 2014 @02:19AM (#7782400)
I'm pretty sure the worst case is purely size-dependent.

The write pattern in the HyperDex benchmark is pure random but it still obliterates HyperLevelDB (and don't even think of vanilla LevelDB there). Keep in mind that LMDB uses free pages in sorted order, so even for a random write workload, pages are allocated in ascending order, which generally translates to unidirectional seeks on an HDD. This is why even for a purely random write load, LMDB is still faster than all of the traditional update-in-place B-trees out there - they really have to do random seeks, LMDB doesn't. (And you pay the highest in seek time when the drive head has to reverse direction.)

That's why LMDB write performance remains uniform under load, while all LSMs suffer from GC/compaction pauses.

But ultimately, storage is moving to solid state, and seek time will be irrelevant.

Re:Symas Lightning Memory-Mapped Database (LMDB) by apendleton on Sunday May 11, 2014 @04:38PM (#7729891)
I'd be curious to see how it compares to LSM, Sqlite4's new underlying KVS.
Re:Symas Lightning Memory-Mapped Database (LMDB) by hyc_symas on Monday May 12, 2014 @01:26PM (#7734086)
The sqlite4 authors tested it. Never published the results, AFAIK. Probably because sqlite4 LSM is a pig. http://www.sqlite.org/src4/info/51816384756d6c620e991bb4ef81...