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

Re: RFC: auto-enabling parallel-checkout on NFS

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Nov 19, 2020, 14:11 UTC
Message-ID
<e0ddf00d-785b-9220-0082-8be54fb7a7c6@jeffhostetler.com>
In-Reply-To
<87y2ixpvos.fsf@evledraar.gmail.com>
On 11/19/20 4:01 AM, Ævar Arnfjörð Bjarmason wrote:
Show 41 quoted lines
> 
>> The major downside is that detecting the file system type is quite
>> platform-dependent, so there is no simple and portable solution. (Also,
>> I'm not sure if the optimal number of workers would be the same on
>> different OSes). But we decided to give it a try, so this is a
>> rough prototype that would work for Linux:
>> https://github.com/matheustavares/git/commit/2e2c787e2a1742fed8c35dba185b7cd208603de9
> 
> I'm not intrinsically opposed to hardcoding some "nr_threads = is_nfs()
> ? x : y" as a stopgap.
> 
> I do think we should be thinking about a sustainable way of doing this
> sort of thing, this method of testing once and hardcoding something
> isn't a good approach.
> 
> It doesn't anticipate all sorts of different setups, e.g. in this case
> NFS is not a FS, but a protocol, there's probably going to be some
> implementations where parallel is much worse due to a quirk of the
> implementation.
> 
> I think integrating an optimization run with the relatively new
> git-maintenance is a better way forward.
> 
> You'd configure e.g.:
> 
>      maintenance.performanceTests.enabled=true
>      maintenance.performanceTests.writeConfig=true
> 
> Which would run e.g.:
> 
>      git config --type bool core.untrackedCache $(git update-index --test-untracked-cache && echo true || echo false)
>      git config checkout.workers $(git maintenance--helper auto-discover-config checkout.workers)
> 
> Such an implementation can be really basic at first, or even just punt
> on the test and use your current "is it NFS?" check.
> 
> But I think we should be moving to some helper that does the actual test
> locally when asked/configured by the user, so we're not making a bunch
> of guesses in advance about the size/shape of the repository, OS/nfs/fs
> etc.
> 

I kinda like this idea. It would give us a chance to let maintenance periodically probe the repo/system and improve some of these tuning knobs.

Jeff
Previous: Ævar Arnfjörð BjarmasonNext: Geert Jansen
Message 8 of 10 in “RFC: auto-enabling parallel-checkout on NFS”
  1. Matheus TavaresNov 15, 2020
  2. Jeff HostetlerNov 16, 2020
  3. Matheus TavaresNov 19, 2020
  4. Jeff HostetlerNov 19, 2020
  5. Ævar Arnfjörð BjarmasonNov 20, 2020
  6. Geert JansenNov 23, 2020
  7. Ævar Arnfjörð BjarmasonNov 19, 2020
  8. Jeff HostetlerNov 19, 2020
  9. Geert JansenNov 23, 2020
  10. Ævar Arnfjörð BjarmasonNov 24, 2020

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.