repository disk usage

Radoslaw AstralStorm Szkodzinski astralstorm at gorzow.mm.pl
Thu Aug 11 02:58:04 CDT 2005


On Thu, 11 Aug 2005 00:32:39 -0700
Matt Mackall <mpm at selenic.com> wrote:

> On Thu, Aug 11, 2005 at 12:21:19PM +0530, Aneesh Kumar wrote:
> > Today i compared the disk usage of a git and hg repository. Here is
> > what i found
> > 
> > linux-2.6-git$ du -s -h 
> > 335M    .
> > linux-2.6-hg$ du -s -h 
> > 449M    .
> > 
> > both top of the tree. 
> 
> Packed git is indeed smaller. Almost all of this savings is due to the
> fact that it crams everything in a very small number of files.
> Consider:
> 
> - 18335 files checked in
> - Average wasted block space per .d file: 2k average
> - Average wasted block space per .i file: ~4k (decreases to 2k in the limit)
> - total wasted space: 18335 * 6k = 112M
> 
> If you run hg on a ext3 filesystem with 1k blocks, that overhead will
> of course shrink to something like 30M.
> 

And if you run on a modern, non-inode filesystem like xfs, jfs, reiserfs or
reiser4, there's almost no overhead.
And if you want to save space without changing your preferred filesystem, use
loop files.

-- 
AstralStorm

GPG Key ID = 0xD1F10BA2
GPG Key fingerprint = 96E2 304A B9C4 949A 10A0  9105 9543 0453 D1F1 0BA2
Please encrypt if you can.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://www.selenic.com/pipermail/mercurial/attachments/20050811/1d489bb2/attachment.pgp


More information about the Mercurial mailing list