Page MenuHomePhabricator

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

Event Timeline

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

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 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 '[timestamp,duration,builtOn,result]' | ruby -r json -r date -e 'JSON.parse(["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

per discussion on T191921

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