[PATCH 3 of 3 V2] chgserver: add a config option to preload repo

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Mar 16 16:12:34 EDT 2016



On 03/16/2016 05:08 AM, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1457986958 0
> #      Mon Mar 14 20:22:38 2016 +0000
> # Node ID 6e00407bda3045d0abe19c0c2c5eba8fd296d41e
> # Parent  f09ac10a2f99ebc65143aff19fa73d1ad3024da0
> chgserver: add a config option to preload repo
>
> chgserver was designed to load repo per request to minimize the number of
> server processes and to be more confident. But it may also work with repo
> preloaded as well, which should be good for performance but is more risky
> in current situation due to repo.invalidateall and ui/config handling is
> not perfect yet.
>
> This patch adds an experimental config option "chgserver.preloadrepo" and
> changes confighash and mtimehash to optionally include the repo directory.
> It will also change the default behavior to drop the repo object, which
> will solve the big issue that chg uses a wrong repo for users.
>
> diff --git a/hgext/chgserver.py b/hgext/chgserver.py
> --- a/hgext/chgserver.py
> +++ b/hgext/chgserver.py
> @@ -34,8 +34,11 @@
>   ::
>
>     [chgserver]
> -  idletimeout = 3600 # seconds, after which an idle server will exit
> -  skiphash = False   # whether to skip config or env change checks
> +  idletimeout = 3600  # seconds, after which an idle server will exit
> +  preloadrepo = False # whether to preload repo object (experimental)
> +                      # set it to true may increase the number of server
> +                      # processes but will make things a bit faster
> +  skiphash = False    # whether to skip config or env change checks

Isn't it a bit early to play with that ? I would advocate that we get 
something running (pass all tests, including 3rd party of interrest to 
you) then introduce these option with some timing data.

Because right now, we suspect this would help but we seems to be lacking 
performance number to back there usefulness.

(also, please make a patch for each option)

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list