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

Re: hosting git on a nfs

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Nov 14, 2008, 23:10 UTC
Message-ID
<alpine.LFD.2.00.0811141505100.3468@nehalem.linux-foundation.org>
In-Reply-To
<7v63mq9iao.fsf@gitster.siamese.dyndns.org>
On Fri, 14 Nov 2008, Junio C Hamano wrote:
> 
> If you have 1000 files in a single directory, do you still want 2 threads
> following the "1/500" rule, or they would compete reading the same
> directory and using a single thread is better off?

Well, first off, the "single directory" thing is really a Linux kernel deficiency, and it's entirely possible that it doesn't even exist on other systems. Linux has a very special directory cache (dcache) model that is pretty unique - it's part of why cached 'lstat()' calls are so cheap on Linux - but it is also part of the reason for why we serialize lookups when we do miss in the cache (*).

Secondly, anybody who has a thousand tracked files in a single directory can damn well blame themselves for being stupid. So I don't think it's a case that is worth worrying too much about. Git will slow down for that kind of situation for other reasons (ie a lot of the tree pruning optimization won't work for projects that have large flat directories).

So i wouldn't worry about it. That said, with the second patch, we default to having people enable this explicitly, so it's something that people can decide on their own.

			Linus

(*) That said - the Linux dcache consistency is just _one_ reason why we serialize lookups. I would not be in the least surprised if other OS's have the exact same issue. I'd love to fix it in Linux, but quiet honestly, it has never actually come up before now, and we've literally worked on multi-threading the _cached_ case, not the uncached one.

Previous: Junio C HamanoNext: Junio C Hamano
Message 26 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.