-
Notifications
You must be signed in to change notification settings - Fork 684
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
Choose the fastest php implementation #309
Comments
Hi, An update from this issue: I had a micro-benchmark between Swoole Vs Nginx+Php-fpm. Most of the framework written in PHP now is sync so I have no way other than choosing vanilla PHP to perform the benchmark. The benchmark workflow is like that: Apache ab ---> Swoole I tried to set up Nginx as a reverse proxy on top of Swoole, but It does not work! Pain. Here is the result: https://gist.github.com/doanguyen/4211d393a975ec361cd1f299182f9859 Conclusion: It seems php-pm is very good for managing php process, so I will take a look later. |
🎉 I'll be quite happy to see what's happening with those generation of tools |
@doanguyen you can also |
@doanguyen I have tested |
I've just made a quick test, it eats ram like twice as Chrome or even worse, workers don't seem to restart as they said. |
@doanguyen I've create an issue php-pm/php-pm-docker#18 to have some helps / see what's happening |
I guess you miss that: https://github.com/php-pm/php-pm-httpkernel setting up phppm is a pain. |
Did you try |
PHP-PM, 10 workers $ wrk -c 10 -d 10s http://172.17.0.2:8080/user/0 -v --timeout 2s --latency
wrk 4.1.0 [epoll] Copyright (C) 2012 Will Glozer
Running 10s test @ http://172.17.0.2:8080/user/0
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 193.17ms 284.81ms 1.20s 80.96%
Req/Sec 209.65 130.33 670.00 68.60%
Latency Distribution
50% 12.97ms
75% 339.05ms
90% 692.05ms
99% 978.06ms
3675 requests in 10.03s, 1.90MB read
Requests/sec: 366.29
Transfer/sec: 193.74KB Not much better than: nginx+php-fpm $ wrk -c 10 -d 10s http://172.17.0.2:8080/user/0 -v --timeout 2s --latency
wrk 4.1.0 [epoll] Copyright (C) 2012 Will Glozer
Running 10s test @ http://172.17.0.2:8080/user/0
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 71.20ms 114.21ms 632.32ms 86.77%
Req/Sec 173.41 81.91 363.00 61.70%
Latency Distribution
50% 21.52ms
75% 39.95ms
90% 241.27ms
99% 507.64ms
3280 requests in 10.01s, 1.79MB read
Requests/sec: 327.73
Transfer/sec: 183.01KB |
I think we stick to the nginx+php-fpm since php-pm is leaked in memory, and doesn't seem to fix in a short time. |
Souds good for me. Thanks for your work |
Following #249 (comment), it'll be great to test
php
implementationwith new generation servers
Nginx
/php-fpm
was a default choice 😛@bonfante if you are interested to see diffs between implementations, feel free to
PR
❤️ we will have to choose the more performant / usable / standardThe text was updated successfully, but these errors were encountered: