[patch 0/5] [PATCH CFT] more revlog experiments
Ollivier Robert
roberto at keltia.freenix.fr
Tue Mar 21 10:23:25 UTC 2006
According to Matt Mackall:
> a) breaks hg log foo.c (we no longer have file level indices)
> b) breaks hg debugindex .hg/data/foo.c.i (poking around at the
> internals gets much harder)
Can't these two be fixed (at an higher CPU cost I guess but I do think we
can live with that).
> c) introduces an arbitrarily large multiplier (files per directory)
> into all single file operations (like breaking a hardlink)
> d) adds a bunch of new complexity to be performant
> Point (c) is the worst, and it means it's hard to consider this scheme
> as a default. And (d) means this will likely prove hard to maintain as
> an option.
These two points are important.
> Assuming the operating system reads and caches inodes and
> directory data at least a block at a time, we shouldn't see a huge
> seek win here. And if we do, perhaps we can mitigate it by pre-opening
> a directory's worth of files at checkout time. So what's going on?
>
> As to space savings, this falls into three components:
My tests on the /usr/ports repo on hg.fr.freebsd.org gives that:
revlog v0
-----
added 148830 changesets with 609121 changes to 134961 files
in 49mn
revol1% du -sk ports.old/.hg
793648 ports.old/.hg with 269929 files in 27565 direcotories
-----
revlogng with default=2,manifest=1,changelog=1 (packing for files)
-----
added 148822 changesets with 606446 changes to 134950 files
in 43mn
du -sk .hg
398002 .hg with 55111 files in 27565 directories
-----
The gain is obvious there, half the disk space for metadat & history and
almost 5 times less files. I'd expect cloning times to be less too and as
we don't have partial clone/checkout, it can be important.
I know this tree is something of an edge case but big trees do exist and
the fact that even with v0 (and better with ng), HG can handle them is a
strong point for me.
--
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto at keltia.freenix.fr
Darwin snuadh.freenix.org Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005
More information about the Mercurial
mailing list