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

Re: [PATCH 0/3] index-pack threading defaults

From
Jeff King <peff@peff.net>
Date
Aug 21, 2020, 18:44 UTC
Message-ID
<20200821184459.GB3263614@coredump.intra.peff.net>
In-Reply-To
<20200821175153.GA3263018@coredump.intra.peff.net>
On Fri, Aug 21, 2020 at 01:51:53PM -0400, Jeff King wrote:
Show 6 quoted lines
> That value was determined experimentally in 2012. I'm not sure of the
> exact reason it's different now (modern processors are better at
> parallelism, or modern git is better at parallelism, or the original
> experiment was just a fluke). But regardless, I can get on the order of
> a two-to-one speedup by bumping the thread count. See the final patch
> for timings and more specific discussion.

After writing a response elsewhere in the thread, it occurred to me that a good candidate for explaining this may be that our modern sha1dc implementation is way slower than what we were using in 2012 (which would have been either block-sha1, or the even-faster openssl implementation). And since a good chunk of index-pack's time is going to computing sha1 hashes on the resulting objects, that means that since 2012, we're spending relatively more time in the hash computation (which parallelizes per-object) and less time in the other parts that happen under a lock.

-Peff
Previous: Eric SunshineNext: Junio C Hamano
Message 11 of 13 in “index-pack threading defaults”
  1. 0/3 index-pack threading defaultsJeff King, Aug 21, 2020
  2. 1/3 p5302: disable thread-count parameter tests by defaultJeff King, Aug 21, 2020
  3. 2/3 p5302: count up to online-cpus for thread testsJeff King, Aug 21, 2020
  4. Jeff KingAug 21, 2020
  5. 3/3 index-pack: adjust default threading capJeff King, Aug 21, 2020
  6. Eric SunshineAug 21, 2020
  7. Jeff KingAug 21, 2020
  8. brian m. carlsonAug 22, 2020
  9. Jeff KingAug 24, 2020
  10. Eric SunshineAug 24, 2020
  11. Jeff KingAug 21, 2020
  12. Junio C HamanoAug 21, 2020
  13. Jeff KingAug 21, 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.