git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: David Brown <git@davidb.org>, Thomas Koch <thomas@koch.ro>,
	git@vger.kernel.org, dabe@ymc.ch
Subject: Re: hosting git on a nfs
Date: Thu, 13 Nov 2008 13:18:26 -0500	[thread overview]
Message-ID: <20081113181826.GA16741@fieldses.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0811120959050.3468@nehalem.linux-foundation.org>

On Wed, Nov 12, 2008 at 10:14:44AM -0800, Linus Torvalds wrote:
> 
> 
> On Wed, 12 Nov 2008, David Brown wrote:
> > 
> > We had occasionally run into locking problems with 1.5.4.x with
> > renames between different directories.  This should be fixed in
> > 1.6.0.3, but we have since migrated to a server model so I don't have
> > any way of testing this.
> 
> I suspect it also depends very much on the particular client/server 
> combination. Renaming across directories is one of those NFS things that 
> some servers don't mind at all.

On the linux server you want to make sure you're exporting with
no_subtree_check (see "man exports").

> > The configuration we did find completely unworkable was using git with 
> > the work tree on NFS.
> 
> Doing an 'lstat()' on every single file in the tree would tend to do that 
> to you, yes. Even with a fast network and a good NFS server, we're talking 
> millisecond-range latencies, and if your tree has tens of thousands of 
> files, you're going to have each "git diff" take several seconds.
> 
> NFS metadata caching can help, but not all clients do it, and even clients 
> that _do_ do it tend to have rather low timeouts or rather limited cache 
> sizes, so doing "git diff" twice may speed up the second one only if it's 
> done really back-to-back - if even then.
> 
> And once you get used to "git diff" being instantaneous, I don't think 
> anybody is ever agan willing to go back to it taking "a few seconds" (and 
> depending on speed of network/server and size of project, the "few" can be 
> quite many ;)

Yep.

> So putting the work-tree on NFS certainly _works_, but yes, from a 
> performance angle it is going to be really irritatingly slower. I don't 
> even think the newer versions of NFS will help with directory and 
> attribute caching - the delegations are per-file afaik, and there is no 
> good support for extending the caching to directories.

File delegations do cover a file's attributes, so in theory they could
help.  But they're only given out on open.  The upcoming 4.1 spec has a
few improvements here, and it might be worth looking at whether they're
sufficient to make this work.

--b.

> That said, I don't think git is any _worse_ than anybody else in the 
> "worktree on NFS" model. A "git diff" will still be superior ot a CVS diff 
> in every way. It's just that when people compare to their home machines 
> where they have the work tree on local disk and aggressively cached, when 
> they then use a NFS work-tree, they'll likely be very very disappointed.
> 
> 				Linus
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-11-13 18:19 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12  9:29 hosting git on a nfs Thomas Koch
2008-11-12 10:10 ` Julian Phillips
2008-11-12 20:31   ` Brandon Casey
2008-11-12 17:36 ` David Brown
2008-11-12 18:14   ` Linus Torvalds
2008-11-13 18:18     ` J. Bruce Fields [this message]
2008-11-13 18:32     ` James Pickens
2008-11-13 20:18       ` Linus Torvalds
2008-11-13 21:05         ` Linus Torvalds
2008-11-13 23:23           ` James Pickens
2008-11-13 23:48             ` Linus Torvalds
2008-11-13 23:23           ` Julian Phillips
2008-11-13 23:42           ` Linus Torvalds
2008-11-14  0:04             ` Julian Phillips
2008-11-14  0:14             ` Brandon Casey
2008-11-14  0:38               ` Linus Torvalds
2008-11-14  0:59                 ` Pieter de Bie
2008-11-14  1:15                 ` Linus Torvalds
2008-11-14  3:33                   ` James Pickens
2008-11-14  5:01                     ` Linus Torvalds
2008-11-14 13:01                   ` Michael J Gruber
2008-11-14 14:31                   ` Kyle Moffett
2008-11-14 18:32                   ` Brandon Casey
2008-11-14 19:23                     ` Linus Torvalds
2008-11-14 20:14                       ` Junio C Hamano
2008-11-14 23:10                         ` Linus Torvalds
2008-11-15 12:08                       ` [PATCH] Makefile: introduce NO_PTHREADS Junio C Hamano
2008-11-15 17:15                         ` Linus Torvalds
2008-11-17 10:03                           ` Mike Ralphson
2008-11-17 10:18                             ` Junio C Hamano
2008-11-17 10:34                             ` Johannes Sixt
2008-11-17 10:45                               ` Mike Ralphson
2008-11-17 11:25                                 ` Johannes Sixt
2008-12-01  8:29                                   ` Johannes Sixt
2008-12-01  8:48                                     ` dhruva
2008-12-01  9:57                                     ` Mike Ralphson
2008-12-01 16:09                                     ` Mike Ralphson
2008-12-01 16:13                                     ` Mike Ralphson
2008-12-02  7:41                                       ` Johannes Sixt
2008-12-03  2:18                                         ` Junio C Hamano
2008-11-17 16:38                           ` Junio C Hamano
2008-11-17 16:47                             ` Linus Torvalds
2008-11-17 17:01                               ` Fix index preloading for racy dirty case Linus Torvalds
2008-11-17 16:41                           ` [PATCH] Makefile: introduce NO_PTHREADS Junio C Hamano

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

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

  git send-email \
    --in-reply-to=20081113181826.GA16741@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=dabe@ymc.ch \
    --cc=git@davidb.org \
    --cc=git@vger.kernel.org \
    --cc=thomas@koch.ro \
    --cc=torvalds@linux-foundation.org \
    /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.
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 NNTP newsgroup(s).