Version Information :
phabricator: a4a9485612839072a46e715d1ce47c29eddcb134 (Mon, Jan 16) arcanist: ade25facfdf22aed1c1e20fed3e58e60c0be3c2b (Thu, Jan 5) phutil: 9d85dfab0f532d50c2343719e92d574a4827341b (Fri, Jan 13) php: 5.6.29, with apcu apache: 2.4.25 mercurial: 3.8.4
Steps leading to the problem:
- installed Phabricator on host (vserver container on a dedicated Linux server, 32-bit userland in case)
- created a project and 6 users
- created and enabled a hosted Mercurial repository
- copied existing repository to the right place (couldn't push because of the whole bundle2 issue discussed elsewhere https://secure.phabricator.com/T9548) and made sure it was imported (process took about an hour, repo is about 5MB and 2800 commits)
- started pushing to it
Observed behaviour:
On an otherwise idle server, right after the first push, CPU usage went from ~1% to a steady 15% (no other pushes was made since).
We also tried hosting the repo elsewhere and have Phabricator mirror it, but the end result was the same in terms of CPU usage. Discussion in the general chat room seems to indicate that this is not normal.
I tried using repository update <repo> --trace. All I saw was 70 calls to hg log, targeting heads (normal and closed) revisions. Each call appear to require about 1.4s user CPU time, for a total of 12.5s user time (8 CPUs on the server). When called manually, mercurial command line is nowhere near as slow as this (0.090s on average).
This raises several questions:
- Why would mercurial calls be so slow when called by phabricator? This seems to be the heart of the problem at hand.
- On a self-hosted repo, since a push triggers an update by phabricator, what are the automatic (time-driven) updates for?
- Can time-driven updates be disabled, as means to mitigate the issue I'm seeing? Or can the frequency be manually adjusted?
Thanks :)