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

Re: why git is so slow for a tiny git push?

From
Han-Wen Nienhuys <hanwen@google.com>
Date
Oct 28, 2021, 13:17 UTC
Message-ID
<CAFQ2z_P8y_zze6sBz4OQzEuEEC7ygGNk2UqHhu+8QkF=Cqv1xA@mail.gmail.com>
In-Reply-To
<576b2f3e162e4f86992d8f4e680d0881@xiaomi.com>
On Sat, Oct 9, 2021 at 8:06 PM 程洋 <chengyang@xiaomi.com> wrote:
Show 11 quoted lines
>
> I have a really big repository which has 9m objects and maybe 300k refs.
> I noticed that git push is really slow for a tiny change. An example shows below
>
> 3 objects which is only 7 kb takes 36 seconds to pack-objects (it's the time after i enable pack.usesparse)
> However if I manually call “pack-objects” with the exactly same objects SHA1. It only take less than 0.005 second
> What is really pass to “pack-objects” when I call “git push”?
>
> I read an article says git will enumerate all "uninteresting objects" to determine what to send. but i don't understand, in my case git should only enumerate objects between "1a2d494b1b71469eebbd42aeabe1736bfa4b51fa..ddf3b84dca1aa4fe209a218380df1482af0d6b48". It's insane. I have a master server and a slave server serve this repository to my users. And i have a cron job to push every change from master to slave. And i found my master server CPU is full all the time because of the push jobs
>
> Is there any solution?

not sure if this is your problem , but we heard reports of bitmaps slowing down push replication for Gerrit (it looks like you're working with Android repositories.). See https://groups.google.com/g/repo-discuss/c/Xb8TbBXUYxw/m/jv5hqZ2PCQAJ for background and suggestions.

-- 
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--

Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Previous: 程洋
Message 16 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.