git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: David Turner <David.Turner@twosigma.com>
To: 'Howard Chu' <hyc@symas.com>,
	"spearce@spearce.org" <spearce@spearce.org>
Cc: "avarab@gmail.com" <avarab@gmail.com>,
	"ben.alex@acegi.com.au" <ben.alex@acegi.com.au>,
	"dborowitz@google.com" <dborowitz@google.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>,
	"gitster@pobox.com" <gitster@pobox.com>,
	"mhagger@alum.mit.edu" <mhagger@alum.mit.edu>,
	"peff@peff.net" <peff@peff.net>,
	"sbeller@google.com" <sbeller@google.com>,
	"stoffe@gmail.com" <stoffe@gmail.com>
Subject: RE: reftable [v5]: new ref storage format
Date: Mon, 14 Aug 2017 16:05:05 +0000	[thread overview]
Message-ID: <4c1c1fc9904f4678823b6c3054c02b4d@exmbdft7.ad.twosigma.com> (raw)
In-Reply-To: <576a2361-1a3d-4bb2-1d31-f095f9e3c708@symas.com>

> -----Original Message-----
> From: Howard Chu [mailto:hyc@symas.com]
> Sent: Monday, August 14, 2017 8:31 AM
> To: spearce@spearce.org
> Cc: David Turner <David.Turner@twosigma.com>; avarab@gmail.com;
> ben.alex@acegi.com.au; dborowitz@google.com; git@vger.kernel.org;
> gitster@pobox.com; mhagger@alum.mit.edu; peff@peff.net;
> sbeller@google.com; stoffe@gmail.com
> Subject: Re: reftable [v5]: new ref storage format
> 
> Howard Chu wrote:
> > 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.

Git, in general, does require concurrent multi-process access, depending on what 
that means.

For example, a post-receive hook might call some git command which opens the 
ref database.  This means that git receive-pack would have to close and 
re-open the ref database.  More generally, a fair number of git commands are
implemented in terms of other git commands, and might need the same treatment.
We could, in general, close and re-open the database around fork/exec, but I am
not sure that this solves the general problem -- by mere happenstance, one might
be e.g. pushing in one terminal while running git checkout in another.  This is 
especially true with git worktrees, which share one ref database across multiple
working directories.


  reply	other threads:[~2017-08-14 16:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-06  3:15 reftable [v5]: new ref storage format Shawn Pearce
2017-08-06 16:56 ` Ævar Arnfjörð Bjarmason
2017-08-06 22:56   ` Shawn Pearce
     [not found]     ` <CAOhB0ruYhGAyNn84ZjS7TH7QdwxNi2bPN8KFxEEBd58B9qVrmg@mail.gmail.com>
2017-08-07 14:41       ` Shawn Pearce
2017-08-07 15:40         ` David Turner
2017-08-08  7:52           ` Jeff King
2017-08-08  9:16             ` Shawn Pearce
2017-08-08  7:38         ` Jeff King
2017-08-09 11:18         ` Howard Chu
2017-08-14 12:30           ` Howard Chu
2017-08-14 16:05             ` David Turner [this message]
2017-08-15  3:54               ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c1c1fc9904f4678823b6c3054c02b4d@exmbdft7.ad.twosigma.com \
    --to=david.turner@twosigma.com \
    --cc=avarab@gmail.com \
    --cc=ben.alex@acegi.com.au \
    --cc=dborowitz@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hyc@symas.com \
    --cc=mhagger@alum.mit.edu \
    --cc=peff@peff.net \
    --cc=sbeller@google.com \
    --cc=spearce@spearce.org \
    --cc=stoffe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).