Page MenuHomePhabricator

Scap should use Eval.Jit=1 when calling rebuildLocalisationCache.php via HHVM
Closed, InvalidPublic

Details

Related Gerrit Patches:

Event Timeline

thcipriani triaged this task as High priority.Sep 6 2018, 3:27 PM
thcipriani created this task.

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

https://gerrit.wikimedia.org/r/459828

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).csv

So 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.058929834

Today (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.05790388

Do 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

https://gerrit.wikimedia.org/r/459828

thcipriani closed this task as Invalid.Sep 12 2018, 1:47 PM

Will try to move to php7.0 per discussion on T191921