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

Re: Using bitmaps to accelerate fetch and clone

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Oct 1, 2012, 12:48 UTC
Message-ID
<CACsJy8Aikmf5vwNhLbELLKfyLLPTppWFvoqGOdSBZ2JoL1C_JQ@mail.gmail.com>
In-Reply-To
<CAJo=hJs8TcU=Vvq4Re2aqTUrgRqiSyHs1rA+fPDHUkvrhwc3OA@mail.gmail.com>
On Mon, Oct 1, 2012 at 9:26 AM, Shawn Pearce <spearce@spearce.org> wrote:
Show 10 quoted lines
> One of the more troublesome problems is building the bitmaps is
> difficult from a streaming processor like index-pack. You need the
> reachability graph for all objects, which is not currently produced
> when moving data over the wire. We do an fsck after-the-fact to verify
> we didn't get corrupt data, but this is optional and currently after
> the pack is stored. We need to refactor this code to run earlier to
> get the bitmap built. If we take Peff's idea and put the bitmap data
> into a new stream rather than the pack-*.idx file we can produce the
> bitmap at the same time as the fsck check, which is probably a simpler
> change.

If we need to go through the whole pack, not random sha-1 access, then index-pack's traversal is more efficient. I have some patches that remove pack-check.c and make fsck use index-pack to walk through packs. It takes much less time. But rev walk for building bitmaps probably does not fit this style of traversal because rev walk does not align with delta walk.

Show 7 quoted lines
> Defining the pack's "edge" as a list of SHA-1s not in this pack but
> known to be required allows us to compute that leaf root tree
> reachability once, and never consider parsing it again. Which saves
> servers that host frequently accessed Git repositories but aren't
> repacking all of the time. (FWIW we repack frequently, I hear GitHub
> does too, because a fully repacked repository serves clients better
> than a partially packed one.)

Probably off topic. Does saving a list of missing bases in the pack index help storing thin packs directly? I may be missing some points because I don't see why thin packs cannot be stored on disk in the first place.

-- 
Duy
Previous: Shawn PearceNext: Shawn Pearce
Message 19 of 20 in “Using bitmaps to accelerate fetch and clone”
  1. Shawn PearceSep 27, 2012
  2. Nguyen Thai Ngoc DuySep 27, 2012
  3. Shawn PearceSep 27, 2012
  4. Nguyen Thai Ngoc DuySep 28, 2012
  5. Jeff KingSep 27, 2012
  6. Shawn PearceSep 27, 2012
  7. Jeff KingSep 27, 2012
  8. Shawn PearceSep 27, 2012
  9. Jeff KingSep 27, 2012
  10. Jeff KingSep 27, 2012
  11. Junio C HamanoSep 27, 2012
  12. Jeff KingSep 27, 2012
  13. David Michael BarrSep 27, 2012
  14. Nguyen Thai Ngoc DuySep 28, 2012
  15. Nguyen Thai Ngoc DuySep 28, 2012
  16. Shawn PearceOct 1, 2012
  17. Nguyen Thai Ngoc DuyOct 1, 2012
  18. Shawn PearceOct 1, 2012
  19. Nguyen Thai Ngoc DuyOct 1, 2012
  20. Shawn PearceOct 2, 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.