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

Re: Resumable clone/Gittorrent (again) - stable packs?

From
Shawn Pearce <spearce@spearce.org>
Date
Jan 6, 2011, 17:05 UTC
Message-ID
<AANLkTinc12H01Us1mkKieZo75hwjgTCZth_wFvRNscMq@mail.gmail.com>
In-Reply-To
<AANLkTikv+L5Da7A5VM7BAgnue=m0O_-nHmHchJzfGxJa@mail.gmail.com>
On Wed, Jan 5, 2011 at 18:29, Zenaan Harkness <zen@freedbms.net> wrote:
> Bittorrent requires some stability around torrent files.
>
> Can packs be generated deterministically?

No. We have been trying to avoid doing that, because it ties us into one particular compression scheme. We can't tune the algorithm and get better compression later, because it would generate a different pack. We also rely on the system's libz to generate the compressed data. A version change to libz may generate a different encoding for the same uncompressed data, simply because they made a tweak to how the compression was performed. Likewise our own delta compression code can be tweaked to produce a different (but logically identical) delta between the same two objects.

Right now packs aren't deterministic because they use multiple threads to generate the deltas, the thread scheduling impacts which base objects deltas are tried against because threads can steal work from each other if one finishes before the other one. Disabling threading entirely slows down delta compression considerably on multi-core machines, but does remove this work-stealing, making the pack deterministic... but only for this exact Git binary, with this same shared libz. If the system libz or Git changes, all bets are off.

We've been down this road before; we don't want to box ourselves into a tight corner by setting for all time these tunable portions of the compression algorithms.

-- 
Shawn.
Previous: Zenaan HarknessNext: John Wyzer
Message 2 of 22 in “Re: Resumable clone/Gittorrent (again) - stable packs?”
  1. Zenaan HarknessJan 6, 2011
  2. Shawn PearceJan 6, 2011
  3. John WyzerJan 10, 2011
  4. Sam VilainJan 10, 2011
  5. Nguyen Thai Ngoc DuyJan 11, 2011
  6. J.H.Jan 11, 2011
  7. Nguyen Thai Ngoc DuyJan 11, 2011
  8. Nicolas PitreJan 6, 2011
  9. Zenaan HarknessJan 7, 2011
  10. Nicolas PitreJan 7, 2011
  11. Jeff KingJan 7, 2011
  12. Jeff KingJan 7, 2011
  13. Zenaan HarknessJan 7, 2011
  14. Ilari LiusvaaraJan 7, 2011
  15. Jeff KingJan 7, 2011
  16. Ilari LiusvaaraJan 7, 2011
  17. Jeff KingJan 7, 2011
  18. Ilari LiusvaaraJan 7, 2011
  19. Jeff KingJan 7, 2011
  20. Sam VilainJan 10, 2011
  21. Nguyen Thai Ngoc DuyJan 10, 2011
  22. Nicolas PitreJan 10, 2011

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.