git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: reftable [v5]: new ref storage format

From
Howard Chu <hyc@symas.com>
Date
Aug 14, 2017, 12:30 UTC
Message-ID
<576a2361-1a3d-4bb2-1d31-f095f9e3c708@symas.com>
In-Reply-To
<ee8f70bd-6f9e-3fb6-67be-ba26b6d5bf16@symas.com>
Howard Chu wrote:
Show 6 quoted lines
> The primary issue with using LMDB over NFS is with performance. All reads are 
> performed thru accesses of mapped memory, and in general, NFS implementations 
> don't cache mmap'd pages. I believe this is a consequence of the fact that 
> they also can't guarantee cache coherence, so the only way for an NFS client 
> to see a write from another NFS client is by always refetching pages whenever 
> they're accessed.
> LMDB's read lock management also wouldn't perform well over NFS; it also uses an mmap'd file. On a local filesystem LMDB read locks are zero cost since they just atomically update a word in the mmap. Over NFS, each update to the mmap would also require an msync() to propagate the change back to the server. This would seriously limit the speed with which read transactions may be opened and closed. (Ordinarily opening and closing a read txn can be done with zero system calls.) 

All that aside, we could simply add an EXCLUSIVE open-flag to LMDB, and prevent multiple processes from using the DB concurrently. In that case, maintaining coherence with other NFS clients is a non-issue. It strikes me that git doesn't require concurrent multi-process access anyway, and any particular process would only use the DB for a short time before closing it and going away.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/
Previous: Howard ChuNext: David Turner
Message 10 of 12 in “Re: reftable [v5]: new ref storage format”
  1. Shawn PearceAug 6, 2017
  2. Ævar Arnfjörð BjarmasonAug 6, 2017
  3. Shawn PearceAug 6, 2017
  4. Shawn PearceAug 7, 2017
  5. David TurnerAug 7, 2017
  6. Jeff KingAug 8, 2017
  7. Shawn PearceAug 8, 2017
  8. Jeff KingAug 8, 2017
  9. Howard ChuAug 9, 2017
  10. Howard ChuAug 14, 2017
  11. David TurnerAug 14, 2017
  12. Jeff KingAug 15, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.