Switch HGitaly to multi-process
By default, in Omnibus and hence Docker setups, HGitaly runs on a Unix Domain Socket, which implies it to be mono-process.
With the increase of duties of HGitaly (merge analysis, then fast-forward merge, then all merges in Heptapod 1.0), this has become probably unreasonable.
We should switch its default configuration to multi-processing (hence listen on a TCP address). The default number of workers is half the number of CPUS plus one.
Because of the policy for maximum memory (by default 1GiB RSS per worker, with some latency in enforcement), the default number of workers can be too much for some installations. Users can tweak it by putting this in /etc/gitlab/heptapod.hgrc
:
[hgitaly]
workers = 2