-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add benchmarking to CI #11068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Add benchmarking to CI #11068
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b6aa6eb
to
0d31d89
Compare
mvorisek
reviewed
Apr 13, 2023
mvorisek
reviewed
Apr 13, 2023
mvorisek
reviewed
Apr 13, 2023
b9b99e2
to
a7056c1
Compare
a7056c1
to
74dee73
Compare
The JIT takes more warmup to compile all hot traces.
5f59f94
to
6465986
Compare
Delay cloning of data repo, abort when there are merge conflicts.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds benchmarking to CI. It currently runs Symfony Demo, Wordpress and Zend/bench.php (adding more is encouraged in the future) using php-cgi, Valgrind, Opcache (and JIT), and the
-T10,1
flag. This flag makes php-cgi execute a warmup request, caching PHP files in shm before running the profiled request. We currently only collect executed CPU instructions. Additional metrics might be useful (e.g. CPU cache misses) but tracking those makes Valgrind factors slower.The results are then committed to https://github.com/iluuu1994/php-benchmark-data/. This repository should be moved to the php GitHub org. However, I don't have the permission to create new repositories, so somebody would have to do it for me (
php/benchmarking-data
). Likewise, we've pinned Symfony Demo and Wordpress to exact sources by committing the full source code (including vendors) to separate repositories (https://github.com/iluuu1994/symfony-demo-2.2.3, https://github.com/iluuu1994/wordpress-6.2), (php/benchmarking-symfony-demo-2.2.3
andphp/benchmarking-wordpress-6.2
, if somebody does it for me). The main reason for this is that changes inmaster
might break the benchmarks, but we can't trivially fix those upstream. Even if we did, pulling in more changes would skew the benchmark, as changes in the libraries may improve or degrade performance for unrelated reasons.@nielsdos also made a visualization for the collected data, which will show development of performance over time, thank you! https://nielsdos.github.io/php-benchmark-visualisation/
I also experimented with
libpfm
instead of using Valgrind, which would use hardware to collect metrics and likely be the better solution as we could run benchmarks at real time and collect more metrics and run more benchmarks (see iluuu1994#73). Unfortunately, this requires a dedicated machine to run which would cost $50 monthly upwards on Digital Ocean.