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

Re: gc getting called on each git command ... what's wrong?

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 8, 2011, 16:50 UTC
Message-ID
<7vhb802row.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1307548930.19438.30.camel@drew-northup.unet.maine.edu>
Drew Northup <drew.northup@maine.edu> writes:
Show 7 quoted lines
>> That's why. See gc.autopacklimit in "git help config" -- by default,
>> git will gc if there are more than 50 pack files.
>
> Do we want to consider ignoring (or automatically doubling, or something
> like that) gc.autopacklimit if that number of packs meet or exceed
> gc.packSizeLimit? I have no idea what the patch for this might look
> like, but it seems to make more sense than this situation.

This is unrelated to the auto-gc, but it also would be fruitful to question if it is a sane setting to limit packfiles to 30M, when the repository needs 100 of them (total around 3G??). Just like having too many loose object files degrade performance (and that is one of the reasons we pack them in the first place), having many packs will degrade performance unnecessarily and to a worse degree, as "check which pack has this particular object" code has to examine all packs, unlike the loose object case where we let the .git/objects/?? fan-out to give us some hashing and the filesystem to do the heavylifting for us.

Previous: Brandon CaseyNext: Jakub Narebski
Message 5 of 10 in “gc getting called on each git command ... what's wrong?”
  1. Geoff RussellJun 8, 2011
  2. Peter HarrisJun 8, 2011
  3. Drew NorthupJun 8, 2011
  4. Brandon CaseyJun 8, 2011
  5. Junio C HamanoJun 8, 2011
  6. Jakub NarebskiJun 8, 2011
  7. Geoff RussellJun 15, 2011
  8. Jakub NarebskiJun 15, 2011
  9. Geoff RussellJun 16, 2011
  10. Jakub NarebskiJun 16, 2011

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.