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

Re: [GSoC] Git Blog 6

From
ZheNing Hu <adlternative@gmail.com>
Date
Jun 28, 2021, 15:55 UTC
Message-ID
<CAOLTT8SFmPVm3SAt=QO9VVAZ=2EYUBb3TToe3tv=kuQTBrXq2w@mail.gmail.com>
In-Reply-To
<CAP8UFD0dDeL6crqqXPRd+564Z8n_EX3ctzRxKyGZFBp2SjbXEQ@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> 于2021年6月28日周一 上午5:53写道:
Show 16 quoted lines
>
> > * Using Google's `gperftools`:
>
> [...]
>
> > Ignore `write`, `inflate` and `000055d9164cdc36`, the execution time of `memcmp`
> > and `memmove` is very large.
> >
> > However, whether it is `git cat-file` before or after re-using the
> > `ref-filter` logic,
> > the functions they call take up similar proportions of time.
>
> Yeah, it's not clear what is causing performance issues from this. It
> may be that the issue is that with the ref-filter code more objects
> need to be fully read. I wonder if there is a way to count that.
>

Yes, maybe we need more precise time, and if it can locate the function in git will be better.

Show 17 quoted lines
> > * Using `perf`:
> > `perf top -p <git-pid>`
> >
> > ```
> > 12.72% libc-2.33.so [.] __memmove_avx_unaligned_erms
> > 7.39% libz.so.1.2.11 [.] inflate
> > 5.56% libz.so.1.2.11 [.] 0x00000000000088ba
> > 5.27% libz.so.1.2.11 [.] adler32_z
> > 3.46% git [.] patch_delta
> > ```
> > We can see that `memmove` is still the part that accounts for the
> > largest proportion of time.
>
> Yeah. Do you think that the code is calling memmove directly or
> through another function? And anyway which part of the code is
> responsible for these calls?
>
There is no clear conclusion yet. But it is likely to be xmemdupz, xstrdup.
> Flame graphs (http://www.brendangregg.com/flamegraphs.html) might help
> get a better idea of what happens.
>
Thanks, I will check if we can take use of it.
Show 5 quoted lines
> > We can already come to a conclusion: A lot of the time of `cat-file
> > --batch` is used for data copy,
> > this may be the focus of our later performance optimization.
>
> Thanks!

Thanks. -- ZheNing Hu

Previous: Christian Couder
Message 3 of 3 in “[GSoC] Git Blog 6”
  1. ZheNing HuJun 27, 2021
  2. Christian CouderJun 27, 2021
  3. ZheNing HuJun 28, 2021

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.