-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Check if restart is pending before trying to lock SHM #11805
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
Check if restart is pending before trying to lock SHM #11805
Conversation
Our application consists of 300K of PHP files (~3Gb of code) and the server has 220 FPM workers. When we tried to enable
PHP code wasn't even in the top 30. The typical stack trace (we're using PHP8.0) for the FPM worker:
After we tried this patch, performance was significantly improved (still worse than with shared memory but way better), and p99 of requests fit into 8 seconds.
I assume that the lock is being held by one of the FPM workers in |
I can collect more data if you're interested or amend the patch if you feel like something is wrong |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine.
Could you please re-target the pull request to PHP-8.1 branch.
This reduces lock contention when Opcache restart is scheduled but not yet started.
ad612cc
to
570ead3
Compare
Done, it's now based on |
This reduces lock contention when Opcache restart is scheduled but not yet started. Closes phpGH-11805
This reduces lock contention when Opcache restart is scheduled but not yet started.