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

Re: hosting git on a nfs

From
JFJ. Bruce Fields <bfields@fieldses.org>
Date
Nov 13, 2008, 18:18 UTC
Message-ID
<20081113181826.GA16741@fieldses.org>
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:
Show 12 quoted lines
> 
> 
> 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").

Show 17 quoted lines
> > 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.
Show 5 quoted lines
> 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.
Show 11 quoted lines
> 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
Previous: Linus TorvaldsNext: James Pickens
Message 6 of 44 in “hosting git on a nfs”
  1. Thomas KochNov 12, 2008
  2. Julian PhillipsNov 12, 2008
  3. Brandon CaseyNov 12, 2008
  4. David BrownNov 12, 2008
  5. Linus TorvaldsNov 12, 2008
  6. J. Bruce FieldsNov 13, 2008
  7. James PickensNov 13, 2008
  8. Linus TorvaldsNov 13, 2008
  9. Linus TorvaldsNov 13, 2008
  10. James PickensNov 13, 2008
  11. Linus TorvaldsNov 13, 2008
  12. Julian PhillipsNov 13, 2008
  13. Linus TorvaldsNov 13, 2008
  14. Julian PhillipsNov 14, 2008
  15. Brandon CaseyNov 14, 2008
  16. Linus TorvaldsNov 14, 2008
  17. Pieter de BieNov 14, 2008
  18. Linus TorvaldsNov 14, 2008
  19. James PickensNov 14, 2008
  20. Linus TorvaldsNov 14, 2008
  21. Michael J GruberNov 14, 2008
  22. Kyle MoffettNov 14, 2008
  23. Brandon CaseyNov 14, 2008
  24. Linus TorvaldsNov 14, 2008
  25. Junio C HamanoNov 14, 2008
  26. Linus TorvaldsNov 14, 2008
  27. Makefile: introduce NO_PTHREADSJunio C Hamano, Nov 15, 2008
  28. Linus TorvaldsNov 15, 2008
  29. Mike RalphsonNov 17, 2008
  30. Junio C HamanoNov 17, 2008
  31. Johannes SixtNov 17, 2008
  32. Mike RalphsonNov 17, 2008
  33. Johannes SixtNov 17, 2008
  34. Johannes SixtDec 1, 2008
  35. dhruvaDec 1, 2008
  36. Mike RalphsonDec 1, 2008
  37. Makefile: introduce NO_PTHREADSMike Ralphson, Dec 1, 2008
  38. Makefile: introduce NO_PTHREADSMike Ralphson, Dec 1, 2008
  39. Johannes SixtDec 2, 2008
  40. Junio C HamanoDec 3, 2008
  41. Junio C HamanoNov 17, 2008
  42. Linus TorvaldsNov 17, 2008
  43. Fix index preloading for racy dirty caseLinus Torvalds, Nov 17, 2008
  44. Junio C HamanoNov 17, 2008

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.