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

Re: [PATCH] git exproll: steps to tackle gc aggression

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Aug 7, 2013, 04:36 UTC
Message-ID
<CALkWK0=41FNXQk1cAKdgAd3t3Bzh1KEc3bksu0M1LjdSgfmr3Q@mail.gmail.com>
In-Reply-To
<201308061825.28579.mfick@codeaurora.org>
Martin Fick wrote:
> So, it has me wondering if there isn't a more accurate way
> to estimate the new packfile without wasting a ton of time?

I'm not sure there is. Adding the sizes of individual packs can be off by a lot, because your deltification will be more effective if you have more data to slide windows over and compress. For the purposes of illustration, take a simple example:

packfile-1 has a 30M Makefile and several tiny deltas. Total = 40M. packfile-2 has a 31M Makefile.um and several tiny deltas. Total = 40M.

Now, what is the size of packfile-3 which contains the contents of both packfile-1 and packfile-2? 80M is a bad estimate, because you can store deltas against just one Makefile.

So, unless you do an in-depth analysis of the objects in the packfiles (which can be terribly expensive), I don't see how you can arrive at a better estimate.

Show 6 quoted lines
> If not, one approach which might be worth experimenting with
> is to just assume that new packfiles have size 0!  Then just
> consolidate them with any other packfile which is ready for
> consolidation, or if none are ready, with the smallest
> packfile.  I would not be surprised to see this work on
> average better than the current summation,

That is assuming that all fetches (or pushes) are small, which is probably a good rule; you might like to have a "smallness threshold", although I haven't thought hard about the problem.

Previous: Martin Fick
Message 33 of 33 in “git exproll: steps to tackle gc aggression”
  1. git exproll: steps to tackle gc aggressionRamkumar Ramachandra, Aug 6, 2013
  2. Duy NguyenAug 6, 2013
  3. Junio C HamanoAug 6, 2013
  4. Ramkumar RamachandraAug 7, 2013
  5. Junio C HamanoAug 8, 2013
  6. Ramkumar RamachandraAug 8, 2013
  7. Junio C HamanoAug 8, 2013
  8. Martin FickAug 8, 2013
  9. Junio C HamanoAug 8, 2013
  10. Ramkumar RamachandraAug 8, 2013
  11. Ramkumar RamachandraAug 8, 2013
  12. Junio C HamanoAug 8, 2013
  13. Ramkumar RamachandraAug 8, 2013
  14. Martin LanghoffAug 8, 2013
  15. Jeff KingAug 9, 2013
  16. Ramkumar RamachandraAug 9, 2013
  17. Junio C HamanoAug 9, 2013
  18. Jeff KingAug 9, 2013
  19. Duy NguyenAug 10, 2013
  20. Jeff KingAug 10, 2013
  21. Junio C HamanoAug 10, 2013
  22. Ramkumar RamachandraAug 10, 2013
  23. Duy NguyenAug 10, 2013
  24. Duy NguyenAug 10, 2013
  25. Jeff KingAug 10, 2013
  26. Duy NguyenAug 10, 2013
  27. Ramkumar RamachandraAug 10, 2013
  28. Duy NguyenAug 10, 2013
  29. Jeff KingAug 10, 2013
  30. Martin FickAug 7, 2013
  31. Duy NguyenAug 8, 2013
  32. Martin FickAug 7, 2013
  33. Ramkumar RamachandraAug 7, 2013

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.