Thread (16 messages) flat view 16 messages, 4 authors, 2021-11-25

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

From: Han-Wen Nienhuys <hidden>
Date: 2021-10-28 13:17:21

On Sat, Oct 9, 2021 at 8:06 PM 程洋 [off-list ref] wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help