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

Re: Slow git pushes: sitting 1 minute in pack-objects

From
Jeff King <peff@peff.net>
Date
Mar 9, 2015, 07:53 UTC
Message-ID
<20150309075302.GB31866@peff.net>
In-Reply-To
<CAH8BJxH1uVv9J7yLx1D4GRPKfWYqDw8SRFZKGR_yhjcoTCCT2g@mail.gmail.com>
On Thu, Mar 05, 2015 at 04:03:07PM -0500, Stephen Morton wrote:
> I'm experiencing very slow git pushes. On the order of 1 minute to push a
> trivial one-line change. When I set GIT_TRACE=1, I see that it seems to be
> taking a lot of time in the pack-objects phase.

Can you tell what pack-objects is doing? Perhaps "strace -f -tt" might help. Or even just "time git push", which will tell us whether we're spinning on CPU or something else.

If you watch the progress meter, where does it spend its time? In "counting objects", "compressing objects", or "writing objects"? Or after that?

You said the repo is big. Is it reasonably packed (try running `git gc`). Pack-objects may look at objects that you know the other side has in order to create deltas against them. If you have some crazy situation (e.g., you have several thousand packfiles) that can slow down object access quite a bit. A minute is more than I would expect, but if VFS operations in your VM are slow, that could be it.

-Peff
Previous: Stephen MortonNext: Stephen Morton
Message 4 of 8 in “Slow git pushes: sitting 1 minute in pack-objects”
  1. Stephen MortonMar 5, 2015
  2. Duy NguyenMar 6, 2015
  3. Stephen MortonMar 6, 2015
  4. Jeff KingMar 9, 2015
  5. Stephen MortonMar 10, 2015
  6. Jeff KingMar 16, 2015
  7. Stephen MortonMar 19, 2015
  8. Jeff KingMar 19, 2015

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.