Skip to content

Instantly share code, notes, and snippets.

@pmurzakov
Last active March 30, 2021 14:40
Show Gist options
  • Save pmurzakov/4e535675aec330becc2e8e0e55fc1627 to your computer and use it in GitHub Desktop.
Save pmurzakov/4e535675aec330becc2e8e0e55fc1627 to your computer and use it in GitHub Desktop.
PHP shared nothing, preload, RoadRunner -- useful links and snippets -- Badoo PHP Meetup #3 2019 talk

Badoo Tech Blog: https://tech.badoo.com/ru/

PHP shared nothing architecture

"Производительность PHP: планируем, профилируем, оптимизируем": https://habr.com/ru/company/badoo/blog/430722/

Preload (PHP 7.4)

Preload RFC: https://wiki.php.net/rfc/preload

# perf record --call-graph dwarf,65528 -F 99 -p \
 $(pgrep php-cgi | paste -sd "," -) -- sleep 20
# perf report

zend_accel_load_script(): https://github.com/php/php-src/blob/master/ext/opcache/zend_accelerator_util_funcs.c#L725

wrk2: https://github.com/giltene/wrk2

opcache_get_status(): https://www.php.net/manual/en/function.opcache-get-status.php

preload bug found&fixed by us: https://bugs.php.net/bug.php?id=78376

RoadRunner

RoadRunner: https://github.com/spiral/roadrunner

phpspy: https://github.com/adsr/phpspy

Misc

Slides: TODO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment