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

Re: non-smooth progress indication for git fsck and git gc

From
Jeff King <peff@peff.net>
Date
Sep 7, 2018, 03:30 UTC
Message-ID
<20180907033003.GA1383@sigill.intra.peff.net>
In-Reply-To
<87musybk7d.fsf@evledraar.gmail.com>
On Mon, Sep 03, 2018 at 06:48:54PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 19 quoted lines
> > And there are definitely a few nasty bits (like the way the progress is
> > ended). I'm not planning on taking this further for now, but maybe
> > you or somebody can find it interesting or useful.
> 
> I think it would be really nice if this were taken further. Using my
> perf test in
> https://public-inbox.org/git/20180903144928.30691-7-avarab@gmail.com/T/#u
> I get these results:
> 
>     $ GIT_PERF_LARGE_REPO=/home/aearnfjord/g/linux GIT_PERF_REPEAT_COUNT=5 GIT_PERF_MAKE_OPTS='-j56 CFLAGS="-O3"' ./run HEAD~ HEAD p1450-fsck.sh
>     [...]
>     Test           HEAD~                 HEAD
>     ----------------------------------------------------------------
>     1450.1: fsck   384.18(381.63+2.53)   301.52(508.28+38.34) -21.5%
> 
> 
> I.e. this gives a 20% speedup, although of course some of that might be
> because some of this might be skipping too much work, but looks really
> promising.

I'm pretty sure it's doing the correct thing, in terms of doing all the right checks. But look at your CPU time. You're getting a 20% wall-clock speedup, but spending a lot more CPU. So the main difference is really the multi-threading in index-pack. It should be strictly worse in terms of total CPU on a single-processor system because we're doing work in the sub-process (so we pay for the process invocation, but also we probably are unable to share things like in-memory commit structs, wasting a little extra time).

So I'm on the fence on whether it is worth it. I like getting rid of the duplicated code. But on the other hand it is not all that complex, and maybe when it comes to things like fsck it is good to have a different implementation than the one that writes the .idx out in the first place.

-Peff
Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 24 of 25 in “non-smooth progress indication for git fsck and git gc”
  1. Ulrich WindlAug 16, 2018
  2. Duy NguyenAug 16, 2018
  3. Jeff KingAug 16, 2018
  4. Antw: Re: non-smooth progress indication for git fsck and git gcUlrich Windl, Aug 20, 2018
  5. Jeff KingAug 16, 2018
  6. Jeff KingAug 16, 2018
  7. Junio C HamanoAug 16, 2018
  8. Ævar Arnfjörð BjarmasonAug 16, 2018
  9. Jeff KingAug 16, 2018
  10. Jeff KingAug 16, 2018
  11. Duy NguyenAug 17, 2018
  12. Antw: Re: non-smooth progress indication for git fsck and git gcUlrich Windl, Aug 20, 2018
  13. Ævar Arnfjörð BjarmasonAug 20, 2018
  14. Ulrich WindlAug 20, 2018
  15. Jeff KingAug 21, 2018
  16. Ulrich WindlAug 21, 2018
  17. Duy NguyenAug 21, 2018
  18. Ævar Arnfjörð BjarmasonSep 1, 2018
  19. Ævar Arnfjörð BjarmasonSep 1, 2018
  20. Jeff KingSep 2, 2018
  21. Jeff KingSep 2, 2018
  22. Jeff KingSep 2, 2018
  23. Ævar Arnfjörð BjarmasonSep 3, 2018
  24. Jeff KingSep 7, 2018
  25. Junio C HamanoSep 4, 2018

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.