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

RE: [External Mail]Re: why git is so slow for a tiny git push?

From
程程洋 <chengyang@xiaomi.com>
Date
Oct 14, 2021, 06:47 UTC
Message-ID
<5063751fd4b94ccca3987080c96370d8@xiaomi.com>
In-Reply-To
<YWYAjRfLsDtc1Dkm@coredump.intra.peff.net>

Seems that git receive-pack only takes 1 seconds. After that, git rev-list takes the most time, I don't know what is it doing

-----Original Message-----
From: Jeff King <peff@peff.net>
Sent: Wednesday, October 13, 2021 5:39 AM
To: 程洋 <chengyang@xiaomi.com>
Cc: git@vger.kernel.org
Subject: Re: [External Mail]Re: why git is so slow for a tiny git push?
*This message originated from outside of XIAOMI. Please treat this email with caution*
On Tue, Oct 12, 2021 at 09:08:08AM +0000, 程洋 wrote:
Show 6 quoted lines
> Jesus. It works for me. After disable writebitmap, time cost decrease
> from 33 seconds to 0.9 seconds.
>
> But now it turns out that, remote side takes 13 seconds to receive the
> pack,  since git receive-pack is triggered automatically from remote
> side, is there anyway to enable GIT_TRACE2_PERF on server side?

For the environment variable, it depends on your protocol. If you can push over ssh (and the other side lets you execute arbitrary commands), then:

  git push --receive-pack='GIT_TRACE2_PERF=/tmp/foo.trace git-receive-pack'
Otherwise, you can look at setting the trace2.perfTarget config option on the server side. I haven't played with it myself before.

-Peff #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Previous: Jeff KingNext: Jeff King
Message 7 of 16 in “why git is so slow for a tiny git push?”
  1. 程洋Oct 9, 2021
  2. Jeff KingOct 11, 2021
  3. 程洋Oct 12, 2021
  4. Jeff KingOct 12, 2021
  5. 程洋Oct 12, 2021
  6. Jeff KingOct 12, 2021
  7. 程洋Oct 14, 2021
  8. Jeff KingOct 26, 2021
  9. 程洋Oct 27, 2021
  10. Ævar Arnfjörð BjarmasonOct 12, 2021
  11. Jeff KingOct 12, 2021
  12. 程洋Nov 23, 2021
  13. Jeff KingNov 24, 2021
  14. 程洋Nov 25, 2021
  15. 程洋Nov 24, 2021
  16. Han-Wen NienhuysOct 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.