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

Re: [PATCH] Prevent megablobs from gunking up git packs

From
GBGeert Bosch <bosch@adacore.com>
Date
May 24, 2007, 20:43 UTC
Message-ID
<C35F50C5-28E8-45B6-8A4E-02233CE4B4B9@adacore.com>
In-Reply-To
<20070524071235.GL28023@spearce.org>

[resent because of malformed headers causing rejection] On May 24, 2007, at 03:12, Shawn O. Pearce wrote:

Show 9 quoted lines
> I still don't buy the idea that these megablobs shouldn't be packed.
> I understand Dana's pain here (at least a little bit, my problems
> aren't as bad as his are), but I also hate to see us run away from
> packfiles for these really sick cases just because we have some
> issues in our current packfile handling.
>
> Packfiles give us a lot of benefits:
>
>  1) less inode usage;
Using 1 inode per huge blob can never be an issue
>  2) transport can write directly to local disk;
>  3) transport can (quickly) copy from local disk;
Can do these by re-enabling the new loose object format
>  4) testing for existance is *much* faster;
>  5) deltafication is possible;

Look at it the other way. If we have huge objects (say >1GB), we should put them in a pack of their own anyway. What's better: having a pack with a separate index file or just a loose object? While the one object per file model is awful for many small files with lots of similarity, it is really quite efficient for large objects, and the most reasonable model for huge objects.

Such blobs are just too large to do anything useful with. The only operations done on them will be to check them in or check them out. Ideally, we should never try to have them in memory at all, but just stream them to/from disk while compressing or decompressing.

Trying to deltify huge objects just takes too much time. Similarly, we don't want to read 100MB to then apply a delta and maybe throw out half of the data we read in the first place. It's just too inefficient. If we'd even read the huge blobs once during "git repack", we'll waste so much time that we're unlikely to ever gain it back in any real world scenario.

   -Geert
Previous: Shawn O. PearceNext: Dana How
Message 21 of 24 in “Prevent megablobs from gunking up git packs”
  1. Prevent megablobs from gunking up git packsDana How, May 22, 2007
  2. Shawn O. PearceMay 22, 2007
  3. Dana HowMay 22, 2007
  4. Junio C HamanoMay 22, 2007
  5. Dana HowMay 22, 2007
  6. Jakub NarebskiMay 22, 2007
  7. Dana HowMay 22, 2007
  8. Jakub NarebskiMay 22, 2007
  9. Junio C HamanoMay 23, 2007
  10. Nicolas PitreMay 23, 2007
  11. Nicolas PitreMay 22, 2007
  12. Dana HowMay 22, 2007
  13. Junio C HamanoMay 23, 2007
  14. Dana HowMay 23, 2007
  15. Junio C HamanoMay 24, 2007
  16. Shawn O. PearceMay 24, 2007
  17. Johannes SchindelinMay 24, 2007
  18. david@lang.hmMay 24, 2007
  19. Johannes SchindelinMay 24, 2007
  20. Shawn O. PearceMay 25, 2007
  21. Geert BoschMay 24, 2007
  22. Dana HowMay 24, 2007
  23. Shawn O. PearceMay 25, 2007
  24. Nicolas PitreMay 25, 2007

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.