[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
NFS-shared LMDB?
It occurs to me that there is the potential to support an interesting use case
with LMDB when the database resides on remote shared storage. In the context
of slapd, you could run multiple read-only slapds concurrent with a single
read-write slapd on a single database.
The current liblmdb would need a couple small modifications to make this safe
- an option to use fcntl(LOCK) when obtaining a reader slot, and an msync()
when writing to a reader slot, to force reader lock table changes back to the
server before progressing on a read txn.
With an appropriate sharding director (like the feature recently added to
back-meta) you could arrange so that each slapd instance serves reads for a
distinct portion of the overall database. Then each host's memory would be
caching a distinct set of data, maximizing cache effectiveness. The DB size
could then grow arbitrarily large, and you simply add more machines/RAM/slapds
as needed to keep serving from cache.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/