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

Re: Questions on GSoC 2019 Ideas

From
Jeff King <peff@peff.net>
Date
Mar 5, 2019, 04:51 UTC
Message-ID
<20190305045140.GH19800@sigill.intra.peff.net>
In-Reply-To
<CACsJy8ATKdcDdbTzCdZFhChKEAWhjuYQJBpGXZ9HAVXK1r2pFw@mail.gmail.com>
On Sun, Mar 03, 2019 at 05:12:59PM +0700, Duy Nguyen wrote:
Show 18 quoted lines
> On Sun, Mar 3, 2019 at 2:18 PM Christian Couder
> <christian.couder@gmail.com> wrote:
> > One thing I am still worried about is if we are sure that adding
> > parallelism is likely to get us a significant performance improvement
> > or not. If the performance of this code is bounded by disk or memory
> > access, then adding parallelism might not bring any benefit. (It could
> > perhaps decrease performance if memory locality gets worse.) So I'd
> > like some confirmation either by running some tests or by experienced
> > Git developers that it is likely to be a win.
> 
> This is a good point. My guess is the pack access consists of two
> parts: deflate zlib, resolve delta objects (which is just another form
> of compression) and actual I/O. The former is CPU bound and may take
> advantage of multiple cores. However, the cache we have kinda helps
> reduce CPU work load already, so perhaps the actual gain is not that
> much (or maybe we could just improve this cache to be more efficient).
> I'm adding Jeff, maybe he has done some experiments on parallel pack
> access, who knows.

Sorry, I don't have anything intelligent to add here. I do know that `index-pack` doesn't scale well with more cores. I don't think I've ever looked at adding parallel access to the packs themselves. I suspect it would be tricky due to a few global variables (the pack windows, the delta cache, etc).

Show 6 quoted lines
> The second good thing from parallel pack access is not about utilizing
> processing power from multiple cores, but about _not_ blocking. I
> think one example use case here is parallel checkout. While one thread
> is blocked by pack access code for whatever reason, the others can
> still continue doing other stuff (e.g. write the checked out file to
> disk) or even access the pack again to check more things out.

I'm not sure if it would help much for packs, because they're organized to have pretty good cold-cache read-ahead behavior. But who knows until we measure it.

I do suspect that inflating (and delta reconstruction) done in parallel could be a win for git-grep, especially if you have a really simple regex that is quick to search.

-Peff
Previous: Duy NguyenNext: Duy Nguyen
Message 8 of 24 in “Questions on GSoC 2019 Ideas”
  1. Matheus Tavares BernardinoFeb 28, 2019
  2. Christian CouderFeb 28, 2019
  3. Duy NguyenMar 1, 2019
  4. Thomas GummererMar 2, 2019
  5. Christian CouderMar 3, 2019
  6. Duy NguyenMar 3, 2019
  7. Duy NguyenMar 3, 2019
  8. Jeff KingMar 5, 2019
  9. Duy NguyenMar 5, 2019
  10. Matheus Tavares BernardinoMar 5, 2019
  11. Duy NguyenMar 6, 2019
  12. Matheus Tavares BernardinoMar 12, 2019
  13. Duy NguyenMar 12, 2019
  14. Duy NguyenMar 12, 2019
  15. Matheus Tavares BernardinoApr 4, 2019
  16. Christian CouderApr 4, 2019
  17. Mike HommeyApr 4, 2019
  18. Matheus Tavares BernardinoApr 5, 2019
  19. Christian CouderApr 7, 2019
  20. Matheus Tavares BernardinoMar 5, 2019
  21. Thomas GummererMar 6, 2019
  22. Duy NguyenMar 3, 2019
  23. Thomas GummererMar 3, 2019
  24. Johannes SchindelinMar 1, 2019

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.