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

Re: notify alternative to auto gc?

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 29, 2010, 06:46 UTC
Message-ID
<vpqtyom72ug.fsf@bauges.imag.fr>
In-Reply-To
<5D3639C2-2528-4125-91E0-8D78D4844511@gmail.com>
Karl Stenerud <kstenerud@gmail.com> writes:
> In the case which I observed, the time from typing "git pull" until
> the auto-gc notification was a few seconds.  The time from the
> notification until gc completion, however, was 3-4 minutes.
The missing bit here is how often this happens.

Once you did an actual "git gc", your repository is stored in a single pack file, and only new files are stored unpacked or in separate packs. Subsequent "git gc --auto" will just pack unpacked objects together by groups of approximately "gc.auto" (i.e. 6700), which is quick, until you reach "gc.packlimit" (i.e. 50). You'll trigger an expansive repack only after that. So, roughly, you'll get an expansive repack after creating 300,000 object files (unless you ran "git gc" in the meantime). Unless you do very nasty things with your repo, that really means "not often", and especially "not often enough that you should care" in 99.9% cases.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Karl StenerudNext: Sam Vilain
Message 4 of 21 in “notify alternative to auto gc?”
  1. Karl StenerudJun 28, 2010
  2. Ævar Arnfjörð BjarmasonJun 28, 2010
  3. Karl StenerudJun 28, 2010
  4. Matthieu MoyJun 29, 2010
  5. Sam VilainJun 30, 2010
  6. Matthieu MoyJun 28, 2010
  7. Chris PackhamJun 28, 2010
  8. Karl StenerudJun 28, 2010
  9. Documentation/git-gc.txt: add reference to githooksChris Packham, Jun 28, 2010
  10. Marc BranchaudJun 28, 2010
  11. Junio C HamanoJun 29, 2010
  12. Chris PackhamJun 29, 2010
  13. Junio C HamanoJun 29, 2010
  14. Chris PackhamJun 29, 2010
  15. [PATCHv2] Documentation/git-gc.txt: add reference to githooksChris Packham, Jun 30, 2010
  16. David BrownSep 21, 2010
  17. Chris PackhamSep 21, 2010
  18. David BrownSep 21, 2010
  19. Re* [PATCH/RFC] Documentation/git-gc.txt: add reference to githooksJunio C Hamano, Sep 21, 2010
  20. Eric RaibleJun 28, 2010
  21. Jacob HelwigJun 28, 2010

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.