Re: Unresolved issues #2 (shallow clone again)
- From
Theodore Tso <tytso@mit.edu>
- Date
- May 8, 2006, 00:33 UTC
- Message-ID
- <20060508003338.GB17138@thunk.org>
- In-Reply-To
- <20060507075631.GA24423@coredump.intra.peff.net>
On Sun, May 07, 2006 at 03:56:31AM -0400, Jeff King wrote:
Show 13 quoted lines
> On Sun, May 07, 2006 at 06:08:03PM +1200, Martin Langhoff wrote: > > > >> And in any case commits and trees are lightweight and compress well... > > >Commit maybe, but is this based on a hard fact? > > No hard facts here :( but I think it's reasonable to assume that the > > trees delta/compress reasonably well, as a given commit will change > > just a few entries in each tree. > > A few hard facts (using Linus' linux-2.6 tree): > - original packsize: 120996 kilobytes > - unpacked: 233338 objects, 1417476 kilobytes > This is an 11.7:1 compression ratio (of course, much of this is > wasted space from the 4k block size in the filesystem)
If there are 233338 objects, then the average wasted space due to internal fragmentation is 233338 * 2k, or 466676 kilobytes, or only 36% of the wasted space. Most of the savings is probably coming from the compression and delta packing.
- Ted