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

Re: git pull & git gc

From
Mike Hommey <mh@glandium.org>
Date
Mar 19, 2015, 02:01 UTC
Message-ID
<20150319020117.GA31689@glandium.org>
In-Reply-To
<20150319012722.GA26867@peff.net>
On Wed, Mar 18, 2015 at 09:27:22PM -0400, Jeff King wrote:
Show 14 quoted lines
> On Thu, Mar 19, 2015 at 07:31:48AM +0700, Duy Nguyen wrote:
> 
> > Or we could count/estimate the number of loose objects again after
> > repack/prune. Then we can maybe have a way to prevent the next gc that
> > we know will not improve the situation anyway. One option is pack
> > unreachable objects in the second pack. This would stop the next gc,
> > but that would screw prune up because st_mtime info is gone.. Maybe we
> > just save a file to tell gc to ignore the number of loose objects
> > until after a specific date.
> 
> I don't think packing the unreachables is a good plan. They just end up
> accumulating then, and they never expire, because we keep refreshing
> their mtime at each pack (unless you pack them once and then leave them
> to expire, but then you end up with a large number of packs).

Note, sometimes I wish unreachables were packed. Recently, I ended up in a situation where running gc created something like 3GB of data as per du, because I suddenly had something like 600K unreachable objects, each of them, as a loose object, taking at least 4K on disk. This made my .git take 5GB instead of 2GB. That surely didn't feel like garbage collection.

Mike
Previous: Jeff KingNext: Jeff King
Message 10 of 21 in “git pull & git gc”
  1. Дилян ПалаузовMar 18, 2015
  2. Duy NguyenMar 18, 2015
  3. Дилян ПалаузовMar 18, 2015
  4. Duy NguyenMar 18, 2015
  5. Duy NguyenMar 18, 2015
  6. John KeepingMar 18, 2015
  7. Jeff KingMar 18, 2015
  8. Duy NguyenMar 19, 2015
  9. Jeff KingMar 19, 2015
  10. Mike HommeyMar 19, 2015
  11. Jeff KingMar 19, 2015
  12. Mike HommeyMar 19, 2015
  13. Junio C HamanoMar 19, 2015
  14. Jeff KingMar 19, 2015
  15. Duy NguyenMar 19, 2015
  16. Jeff KingMar 19, 2015
  17. Duy NguyenMar 19, 2015
  18. Jeff KingMar 19, 2015
  19. Duy NguyenMar 19, 2015
  20. Дилян ПалаузовMar 18, 2015
  21. Jeff KingMar 18, 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.