| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Scap: Update config to use PHP=hhvm -vEval.Jit=1 | operations/puppet | production | +3 -0 |
Details
Revisions and Commits
| rMSCA Scap | |||
| Restricted Differential Revision | rMSCAcea7b35dced6 Add ability to specify PHP version for scap, again | ||
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | thcipriani | T191921 mwscript rebuildLocalisationCache.php takes 40 minutes on HHVM (rather than ~5 on PHP 5) | |||
| Invalid | thcipriani | T203680 Scap should use Eval.Jit=1 when calling rebuildLocalisationCache.php via HHVM |
Event Timeline
Change 459828 had a related patch set uploaded (by Thcipriani; owner: Thcipriani):
[operations/puppet@production] Scap: Update config to use PHP=hhvm -vEval.Jit=1
I've merged a patch to scap to allow setting php_version in scap.cfg that will be used in any call to mwscript.
I cherry picked https://gerrit.wikimedia.org/r/459828 on beta which sets php_version: hhvm -vEval.Jit=1 which I can see in the console when scap is running.
I've been keeping track of build duration via the Jenkins API using a one-liner Dan put together for a different job:
curl -g 'https://integration.wikimedia.org/ci/job/beta-scap-eqiad/api/json?tree=allBuilds[timestamp,duration,builtOn,result]' | ruby -r json -r date -e 'JSON.parse(STDIN.read)["allBuilds"].select { |b| b["result"] == "SUCCESS" }.each { |b| b["timestamp"] = DateTime.strptime(b["timestamp"].to_s, "%Q").strftime("%F %T"); puts b.values_at("timestamp", "duration", "builtOn", "result").join(",") }' > buildDuration-$(date -I).csvSo far the version using vEval.Jit=1 is performing slightly worse in terms of overall runtime on average:
Yesterday (removing all builds after 2018-09-10 21:31:42 when I made the change):
(/^ヮ^)/*:・゚✧ units "$(awk -F',' '{sum+=$2}END{print sum/NR}' buildDuration-2018-09-10.csv)milliseconds" "minutes"
* 16.969333
/ 0.058929834Today (removing all builds before 2018-09-10 21:31:42 when I made the change):
(/^ヮ^)/*:・゚✧ units "$(awk -F',' '{sum+=$2}END{print sum/NR}' buildDuration-2018-09-11.csv)milliseconds" "minutes"
* 17.27
/ 0.05790388Do I need to adjust number of threads for rebuildLocalisationCache.php as well? All mwscript calls?
The number of threads is irrelevant as shown on T191921#4248767:
- 1 thread (32 cores): 10m 29s
- 6 threads (32 cores): 10m 35s
- 15 threads (32 cores): 10m 42s
- 30 threads (32 cores): 12m 10s
Which is because HHVM invokes sched_setaffinity() which bind the process to a specific CPU. rebuildLocalisationCache.php forks sub process which inherit the same CPU affinity. Hence all "threads" are running on the same CPU.
So from T191921#4557854, the tldr is for hhvm to be passed: -d hhvm.stats.enable_hot_profiler = 0
Change 459828 abandoned by Thcipriani:
Scap: Update config to use PHP=hhvm -vEval.Jit=1
Reason:
per discussion on T191921