Tricks for taming large repo manifests and/or improving large repo clone times?
Augie Fackler
raf at durin42.com
Wed May 29 13:16:44 UTC 2019
> On May 29, 2019, at 06:28, Lawrence Stewart <lstewart at room52.net> wrote:
>
> Greetings all,
>
> I maintain unofficial Mercurial seed repos [1] for the FreeBSD project's
> Subversion base system [2] and ports (non-base-system software) [3]
> repositories. They have sizable code bases and 20+ year development
> histories with quite a few active branches, and I'm curious if there are
> any tricks to make first-time cloning operations non-glacial?
>
> The server-side repos have been re-cloned in place to bring them up to
> the latest on-disk format as of mercurial 4.9 so they've got
> generaldelta and sparserevlog enabled, yet the manifest remains a beast
> (see end of email for some stats). A git clone from Github [4] is on the
> order of 1.5GiB and substantially faster to clone.
>
> Am I missing anything obvious that would improve the situation?
Are you using clonebundles? https://www.mercurial-scm.org/wiki/ClonebundlesExtension talks about it. The extension is used on the server, and clients will handle it automatically if enabled. The basic idea is you pre-compute a bundle of your repo and stick it someplace fast like a CDN and then clients don't have to pull everything from the main server, only what's changed since the bundle was generated.
The manifest seems abnormally large - it might be worth experimenting with treemanifests (though those need more optimization!), but there also might be something Boris (cc'ed) has up his sleeve that could help.
> Cheers,
> Lawrence
>
> [1] http://hg-beta.freebsd.org/
> [2] https://svn.freebsd.org/base/
> [3] https://svn.freebsd.org/ports/
> [4] https://github.com/freebsd/freebsd.git
>
>
> % ll -Sh freebsd_base/.hg/store/ | head -5
> total 9045573
> -rw-r--r-- 1 mercurial mercurial 8.4G May 29 09:10 00manifest.d
> -rw-r--r-- 1 mercurial mercurial 94M May 29 09:10 00changelog.d
> -rw-r--r-- 1 mercurial mercurial 19M May 29 09:10 00changelog.i
> -rw-r--r-- 1 mercurial mercurial 19M May 29 09:10 00manifest.i
>
>
> % ( cd freebsd_base && hg debugrevlog -m )
> format : 1
> flags : generaldelta
>
> revisions : 314044
> merges : 0 ( 0.00%)
> normal : 314044 (100.00%)
> revisions : 314044
> empty : 6 ( 0.00%)
> text : 0 ( 0.00%)
> delta : 6 (100.00%)
> snapshot : 249 ( 0.08%)
> lvl-0 : 9 ( 0.00%)
> lvl-1 : 28 ( 0.01%)
> lvl-2 : 63 ( 0.02%)
> lvl-3 : 78 ( 0.02%)
> lvl-4 : 56 ( 0.02%)
> lvl-5 : 15 ( 0.00%)
> deltas : 313789 (99.92%)
> revision size : 8980493450
> snapshot : 49264745 ( 0.55%)
> lvl-0 : 6716049 ( 0.07%)
> lvl-1 : 9489539 ( 0.11%)
> lvl-2 : 15489771 ( 0.17%)
> lvl-3 : 11326921 ( 0.13%)
> lvl-4 : 5128059 ( 0.06%)
> lvl-5 : 1114406 ( 0.01%)
> deltas : 8931228705 (99.45%)
>
> chunks : 314044
> 0x00 : 178409 (56.81%)
> empty : 6 ( 0.00%)
> 0x78 (x) : 135629 (43.19%)
> chunks size : 8980493450
> 0x00 : 13738312 ( 0.15%)
> empty : 0 ( 0.00%)
> 0x78 (x) : 8966755138 (99.85%)
>
> avg chain length : 502
> max chain length : 1000
> max chain reach : 8670703257
> compression ratio : 107
>
> uncompressed data size (min/max/avg) : 11478 / 6316502 / 3067610
> full revision size (min/max/avg) : 4705 / 2146298 / 746227
> inter-snapshot size (min/max/avg) : 37043 / 1059537 / 177286
> level-1 (min/max/avg) : 66918 / 1059537 / 338912
> level-2 (min/max/avg) : 37043 / 839817 / 245869
> level-3 (min/max/avg) : 42178 / 500141 / 145216
> level-4 (min/max/avg) : 46902 / 197632 / 91572
> level-5 (min/max/avg) : 50721 / 124426 / 74293
> delta size (min/max/avg) : 12 / 2062244 / 28462
>
> deltas against prev : 304957 (97.19%)
> where prev = p1 : 292735 (95.99%)
> where prev = p2 : 0 ( 0.00%)
> other : 12222 ( 4.01%)
> deltas against p1 : 8827 ( 2.81%)
> deltas against p2 : 0 ( 0.00%)
> deltas against other : 5 ( 0.00%)
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
More information about the Mercurial
mailing list