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

Re: gc --aggressive

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 17, 2012, 22:34 UTC
Message-ID
<7vmx6am1h9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120417221849.GA11936@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> On Tue, Apr 17, 2012 at 03:17:28PM -0700, Junio C Hamano wrote:
>
>> > How many cores are there on this box? Have you tried setting
>> > pack.windowMemory to (12 / # of cores) or thereabouts?
>> 
>> Hrm, from the end-user's point of view, it appears that pack.windowMemory
>> ought to mean the total without having to worry about the division of it
>> across threads (which the implementation should be responsible for).
>
> Agreed. I had to look in the code to check which it meant. I'm not sure
> we can change it without regressing existing users, though.

This is a tangent, but I noticed that the canned settings for "aggressive" use an arbitrarily hardcoded value of depth=250 and window=250 (tweakable with gc.aggressiveWindow).

Even though a shallower depth does cause base candidates with too long a chain hanging to be evicted prematurely while it is still in window and will lead to smaller memory consumption, I do not think the value of "depth" affects the pack-time memory consumption too much. But the runtime performance of the resulting pack may not be great (in the worst case you would have to undelta 249 times to get to the object data). We may want to loosen it a bit.

Also it might make sense to make the window size a bit more flexible depending on the nature of your history (you would get bigger benefit with larger window when your history has fine grained commits; if there are not many few-liner commits, larger window may not help you that much).

Previous: Jeff KingNext: Nicolas Pitre
Message 24 of 26 in “gc --aggressive”
  1. Jay SoffianApr 17, 2012
  2. Jay SoffianApr 17, 2012
  3. Matthieu MoyApr 17, 2012
  4. Jeff KingApr 17, 2012
  5. Jeff KingApr 28, 2012
  6. Nicolas PitreApr 28, 2012
  7. Jeff KingApr 29, 2012
  8. Nicolas PitreApr 29, 2012
  9. Jeff KingMay 1, 2012
  10. Jeff KingMay 1, 2012
  11. Nicolas PitreMay 1, 2012
  12. Junio C HamanoMay 1, 2012
  13. Nicolas PitreMay 1, 2012
  14. Jeff KingMay 1, 2012
  15. Jeff KingMay 1, 2012
  16. Nicolas PitreMay 1, 2012
  17. Nicolas PitreMay 1, 2012
  18. Jeff KingMay 1, 2012
  19. Nicolas PitreMay 1, 2012
  20. Nicolas PitreApr 28, 2012
  21. Jeff KingApr 17, 2012
  22. Junio C HamanoApr 17, 2012
  23. Jeff KingApr 17, 2012
  24. Junio C HamanoApr 17, 2012
  25. Nicolas PitreApr 28, 2012
  26. Andreas EricssonApr 18, 2012

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.