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

Re: Flurries of 'git reflog expire'

From
Jeff King <peff@peff.net>
Date
Jul 5, 2017, 08:20 UTC
Message-ID
<20170705082027.ujddejajjlvto7bp@sigill.intra.peff.net>
In-Reply-To
<20170704075758.GA22249@inner.h.apk.li>
On Tue, Jul 04, 2017 at 09:57:58AM +0200, Andreas Krey wrote:
Show 8 quoted lines
> Questions:
> 
> What can be done about this? Cronjob 'git reflog expire' at midnight,
> so the heuristic don't trigger during the day? (The relnotes don't
> mention anything after 2.4.0, so I suppose a git upgrade won't help.)
> 
> What is the actual cause? Bad heuristics in git itself, or does
> bitbucket run them too often (improbable)?

If it's using --expire-unreachable (which a default "git gc" does), that means the we have to traverse the entire history to see what is reachable and what is not. Added on to a normal git-gc, that's usually not a big deal (it has to do that traversal and much more for the repack). But if bitbucket is triggering it for other operations, that could be related (I don't think anything but gc should ever run it otherwise).

I seem to recall that using --stale-fix is also extremely expensive, too. What do the command line arguments for the slow commands look like? And what does the process tree look like?

-Peff
Previous: Andreas KreyNext: Andreas Krey
Message 4 of 15 in “Flurries of 'git reflog expire'”
  1. Andreas KreyJul 4, 2017
  2. Ævar Arnfjörð BjarmasonJul 4, 2017
  3. Andreas KreyJul 6, 2017
  4. Jeff KingJul 5, 2017
  5. Andreas KreyJul 6, 2017
  6. Bryan TurnerJul 6, 2017
  7. Andreas KreyJul 11, 2017
  8. [BUG] detached auto-gc does not respect lock for 'reflog expire', was Re: Flurries of 'git reflog expire'Jeff King, Jul 11, 2017
  9. gc: run pre-detach operations under lockJeff King, Jul 11, 2017
  10. Junio C HamanoJul 12, 2017
  11. Jeff KingJul 12, 2017
  12. Junio C HamanoJul 12, 2017
  13. Bryan TurnerJul 11, 2017
  14. Jeff KingJul 11, 2017
  15. Jeff KingJul 11, 2017

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.