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

Re: GSoC - Some questions on the idea of

From
Jeff King <peff@peff.net>
Date
Mar 30, 2012, 20:34 UTC
Message-ID
<20120330203430.GB20376@sigill.intra.peff.net>
In-Reply-To
<CA+M5ThTPyic=RhFL2SvuNB0xBWOHxNTaUZrYMB144UjpjCiLoQ@mail.gmail.com>
On Fri, Mar 30, 2012 at 03:51:20PM -0400, Bo Chen wrote:
Show 5 quoted lines
> The sub-problems of "delta for large file" problem.
> 
> 1 large file
> 
> 1.1 text file (always delta well? need to be confirmed)

They often do, but text files don't tend to be large. There are some exceptions (e.g., genetic data is often kept in line-oriented text files, but is very large).

But let's take a step back for a moment. Forget about whether a file is binary or not. Imagine you want to store a very large file in git.

What are the operations that will perform badly? How can we make them perform acceptably, and what tradeoffs must we make? E.g., the way the diff code is written, it would be very difficult to run "git diff" on a 2 gigabyte file. But is that actually a problem? Answering that means talking about the characteristics of 2 gigabyte files, and what we expect to see, and to what degree our tradeoffs will impact them.

Here's a more concrete example. At first, even storing a 2 gigabyte file with "git add" was painful, because we would load the whole thing in memory. Repacking the repository was painful, because we had to rewrite the whole 2G file into a packfile. Nowadays, we stream large files directly into their own packfiles, and we have to pay the I/O only once (and the memory cost never). As a tradeoff, we no longer get delta compression of large objects. That's OK for some large objects, like movie files (which don't tend to delta well, anyway). But it's not for other objects, like virtual machine images, which do tend to delta well.

So can we devise a solution which efficiently stores these delta-friendly objects, without losing the performance improvements we got with the stream-directly-to-packfile approach?

One possible solution is breaking large files into smaller chunks using something like the bupsplit algorithm (and I won't go into the details here, as links to bup have already been mentioned elsewhere, and Junio's patches make a start at this sort of splitting).

Note that there are other problem areas with big files that can be worked on, too. For example, some people want to store 100 gigabytes in a repository. Because git is distributed, that means 100G in the repo database, and 100G in the working directory, for a total of 200G. People in this situation may want to be able to store part of the repository database in a network-accessible location, trading some of the convenience of being fully distributed for the space savings. So another project could be designing a network-based alternate object storage system.

-Peff
Previous: Bo ChenNext: Bo Chen
Message 6 of 43 in “GSoC - Some questions on the idea of "Better big-file support".”
  1. Bo ChenMar 28, 2012
  2. Nguyen Thai Ngoc DuyMar 28, 2012
  3. SergioMar 28, 2012
  4. Bo ChenMar 30, 2012
  5. Bo ChenMar 30, 2012
  6. Jeff KingMar 30, 2012
  7. Bo ChenMar 30, 2012
  8. Sergio CallegariMar 31, 2012
  9. Neal KreitzingerMar 31, 2012
  10. Jeff KingApr 2, 2012
  11. Sergio CallegariApr 3, 2012
  12. Neal KreitzingerApr 11, 2012
  13. Jonathan NiederApr 11, 2012
  14. Neal KreitzingerApr 11, 2012
  15. Jeff KingApr 11, 2012
  16. Neal KreitzingerApr 11, 2012
  17. Neal KreitzingerApr 11, 2012
  18. Jonathan NiederApr 11, 2012
  19. Junio C HamanoApr 11, 2012
  20. Jonathan NiederApr 11, 2012
  21. Neal KreitzingerApr 11, 2012
  22. Jeff KingApr 11, 2012
  23. Neal KreitzingerApr 12, 2012
  24. Jeff KingApr 12, 2012
  25. Neal KreitzingerApr 12, 2012
  26. Bo ChenApr 13, 2012
  27. Neal KreitzingerMar 31, 2012
  28. Jeff KingApr 2, 2012
  29. Junio C HamanoApr 2, 2012
  30. Jeff KingApr 3, 2012
  31. Neal KreitzingerMar 31, 2012
  32. Neal KreitzingerMar 31, 2012
  33. Bo ChenMar 31, 2012
  34. Nguyen Thai Ngoc DuyApr 1, 2012
  35. Bo ChenApr 1, 2012
  36. Nguyen Thai Ngoc DuyApr 2, 2012
  37. Bo ChenMar 30, 2012
  38. Jeff KingMar 30, 2012
  39. Jeff KingApr 15, 2012
  40. Neal KreitzingerApr 15, 2012
  41. Jeff KingApr 16, 2012
  42. Neal KreitzingerMay 10, 2012
  43. Jeff KingMay 10, 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.