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

Re: [PATCH v2 0/4] submodule: parallelize diff

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2022, 05:52 UTC
Message-ID
<xmqqczaxmvv9.fsf@gitster.g>
In-Reply-To
<20221011232604.839941-1-calvinwan@google.com>
Calvin Wan <calvinwan@google.com> writes:
Show 9 quoted lines
> I also wanted to pose another question to list regarding defaults for
> parallel processes. For jobs that clearly scale with the number of
> processes (aka jobs that are mostly processor bound), it is obvious that
> setting the default number of processes to the number of available cores
> is the most optimal option. However, this changes when the job is mostly
> I/O bound or has a combination of I/O and processing. Looking at my use
> case for `status` on a cold cache (see below), we notice that increasing
> the number of parallel processes speeds up status, but after a certain
> number, it actually starts slowing down.

I do not offhand recall how the default parallelism is computed there, but if I am correct to suspect that "git grep" has a similar scaling pattern, i.e. the threads all need to compete for I/O to read from the filesystem to find needles from the haystack, perhaps it would give us a precedent to model the behaviour of this part of the code, too, hopefully?

Previous: Calvin WanNext: Calvin Wan
Message 2 of 11 in “submodule: parallelize diff”
  1. 0/4 submodule: parallelize diffCalvin Wan, Oct 11, 2022
  2. Junio C HamanoOct 12, 2022
  3. Calvin WanOct 14, 2022
  4. 1/4 run-command: add pipe_output_fn to run_processes_parallel_optsCalvin Wan, Oct 11, 2022
  5. Ævar Arnfjörð BjarmasonOct 12, 2022
  6. 2/4 submodule: move status parsing into functionCalvin Wan, Oct 11, 2022
  7. Ævar Arnfjörð BjarmasonOct 12, 2022
  8. Ævar Arnfjörð BjarmasonOct 12, 2022
  9. 3/4 diff-lib: refactor match_stat_with_submoduleCalvin Wan, Oct 11, 2022
  10. 4/4 diff-lib: parallelize run_diff_files for submodulesCalvin Wan, Oct 11, 2022
  11. Ævar Arnfjörð BjarmasonOct 12, 2022

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.