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

Re: [PATCH v4] Add git-grep threads param

From
Stefan Beller <sbeller@google.com>
Date
Nov 9, 2015, 18:40 UTC
Message-ID
<CAGZ79kanRZDCCoN2A+Xb=OseXc1WfF23VNV-aE7s6q1Rr4zccg@mail.gmail.com>
In-Reply-To
<CA+55aFzHic5AN05QkbERFszRC=i3aDDGy9yhXEjgzZjwzFVBLQ@mail.gmail.com>

On Mon, Nov 9, 2015 at 9:55 AM, Linus Torvalds <torvalds@linux-foundation.org> wrote:

Show 16 quoted lines
>
> So stop with the "online_cpus()" stuff. And don't base your benchmarks
> purely on the CPU-bound case. Because the CPU-bound case is the case
> that is already generally so good that few people will care all *that*
> deeply.
>
> Many of the things git does are not for "best-case" behavior, but to
> avoid bad "worst-case" situations. Look at things like the index
> preloading (also threaded). The big win there is - again - when the
> stat() calls may need IO. Sure, it can help for CPU use too, but
> especially on Linux, cached "stat()" calls are really quite cheap. The
> big upside is, again, in situations like git repositories over NFS.
>
> In the CPU-intensive case, the threading might make things go from a
> couple of seconds to half a second. Big deal. You're not getting up to
> get a coffee in either case.

Chiming in here as I have another series in flight doing parallelism. (Submodules done in parallel including fetching, cloning, checking out)

online_cpus() seems to be one of the easiest ballpark estimates for the power of a system.

So what I would have liked to use would be some kind of
  parallel_expect_bottleneck(enum kinds);

with kinds being one of (FS, NETWORK, CPU, MEMORY?) to get an estimate 'good' number to use.

Previous: Victor LeschukNext: Victor Leschuk
Message 18 of 19 in “Add git-grep threads param”
  1. Add git-grep threads paramVictor Leschuk, Oct 27, 2015
  2. Victor LeschukNov 2, 2015
  3. Junio C HamanoNov 2, 2015
  4. Victor LeschukNov 3, 2015
  5. Junio C HamanoNov 3, 2015
  6. Jeff KingNov 4, 2015
  7. Victor LeschukNov 9, 2015
  8. Jeff KingNov 9, 2015
  9. Victor LeschukNov 9, 2015
  10. Jeff KingNov 9, 2015
  11. Victor LeschukNov 9, 2015
  12. Jeff KingNov 9, 2015
  13. Linus TorvaldsNov 9, 2015
  14. Jeff KingNov 9, 2015
  15. Victor LeschukNov 9, 2015
  16. Linus TorvaldsNov 9, 2015
  17. Victor LeschukNov 9, 2015
  18. Stefan BellerNov 9, 2015
  19. Victor LeschukNov 9, 2015

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.