[PATCH 4 of 4] mmapindex: set default to 1MB

Pulkit Goyal 7895pulkit at gmail.com
Mon Dec 3 10:48:19 EST 2018


On Sun, Dec 2, 2018 at 7:23 PM Boris Feld <boris.feld at octobus.net> wrote:

> # HG changeset patch
> # User Boris Feld <boris.feld at octobus.net>
> # Date 1542949784 -3600
> #      Fri Nov 23 06:09:44 2018 +0100
> # Node ID 9708243274585f9544c70925eb0b0fa0ec7aba4f
> # Parent  0fff68dfbe48d87dce8b8736c0347ed5aa79030e
> # EXP-Topic mmap
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
> 970824327458
> mmapindex: set default to 1MB
>
> mmapping index is more efficient if we only need a small part of it.
>
> The 1MB value has been picked arbitrarily, a lower value might be better.


> On a large repository with a 60MB index, we see the following performance
> gain:
>
> hg perfindex
> before: ! wall 0.032023 comb 0.040000 user 0.000000 sys 0.040000 (best of
> 100)
> after:  ! wall 0.000196 comb 0.000000 user 0.000000 sys 0.000000 (best of
> 1060)
>
> The speed boost benefit all cases, including the one where the full index
> needs to be parsed.
>
> hg perfindex --rev 0
> before: ! wall 0.040673 comb 0.030000 user 0.000000 sys 0.030000 (best of
> 100)
> after   ! wall 0.010713 comb 0.020000 user 0.010000 sys 0.010000 (best of
> 212)
>
> This gain reflect in higher level operation:
>
> hg perfbookmarks --clear-revlogs
> before: ! wall 0.161339 comb 0.160000 user 0.130000 sys 0.030000 (best of
> 56)
> after:  ! wall 0.123228 comb 0.120000 user 0.120000 sys 0.000000 (best of
> 68)
>

I can confirm that it is a required config option on large repos and result
in similar speedups. Looks good to me, queued the series. Many thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20181203/ad359032/attachment.html>


More information about the Mercurial-devel mailing list