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

Re: [PATCH] multi item packed files

From
CMChris Mason <mason@suse.com>
Date
Apr 21, 2005, 20:22 UTC
Message-ID
<200504211622.48065.mason@suse.com>
In-Reply-To
<m3u0m0q69a.fsf@defiant.localdomain>
On Thursday 21 April 2005 15:28, Krzysztof Halasa wrote:
Show 11 quoted lines
> Linus Torvalds <torvalds@osdl.org> writes:
> > Wrong. You most definitely _can_ lose: you end up having to optimize for
> > one particular filesystem blocking size, and you'll lose on any other
> > filesystem. And you'll lose on the special filesystem of "network
> > traffic", which is byte-granular.
>
> If someone needs better on-disk ratio, (s)he can go with 1 KB filesystem
> or something like that, without all the added complexity of packing.
>
> If we want to optimize that further, I would try doing it at the
> underlying filesystem level. For example, loop-mounted one.

Shrug, we shouldn't need help from the kernel for something like this. git as a database hits worst case scenarios for almost every FS.

We've got:
1) subdirectories with lots of files
2) wasted space for tiny files
3) files that are likely to be accessed together spread across the whole disk

One compromise for SCM use would be one packed file per commit, with an index that lets us quickly figure out which commit has a particular version of a given file. My hack gets something close to that (broken into 32k chunks for no good reason), and the index to find a given file is just the git directory tree.

But my code does hide the fact that we're packing things from most of the git interfaces. So I can almost keep a straight face while claiming to be true to the original git design...almost. The whole setup is far from perfect, but it is one option for addressing points 2 & 3 above.

-chris
Previous: Martin UeckerNext: Linus Torvalds
Message 8 of 17 in “multi item packed files”
  1. multi item packed filesChris Mason, Apr 21, 2005
  2. Linus TorvaldsApr 21, 2005
  3. Chris MasonApr 21, 2005
  4. Krzysztof HalasaApr 21, 2005
  5. Linus TorvaldsApr 21, 2005
  6. Krzysztof HalasaApr 22, 2005
  7. Martin UeckerApr 22, 2005
  8. Chris MasonApr 21, 2005
  9. Linus TorvaldsApr 21, 2005
  10. Chris MasonApr 22, 2005
  11. Linus TorvaldsApr 22, 2005
  12. Chris MasonApr 22, 2005
  13. Linus TorvaldsApr 22, 2005
  14. Chris MasonApr 22, 2005
  15. Chris MasonApr 22, 2005
  16. Chris MasonApr 25, 2005
  17. Krzysztof HalasaApr 22, 2005

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.