Skip to content
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

PHP 7.3 install problem in tfb-status #4293

Closed
joanhey opened this issue Dec 24, 2018 · 15 comments
Closed

PHP 7.3 install problem in tfb-status #4293

joanhey opened this issue Dec 24, 2018 · 15 comments
Assignees

Comments

@joanhey
Copy link
Contributor

joanhey commented Dec 24, 2018

In the last run all failed to install php7.3, and the actual running also have the same problem.

https://tfb-status.techempower.com/unzip/results.2018-12-23-15-04-49-016.zip/results/20181220223653/php-raw7/build/php-raw7.log

Really strange when in travis is working perfectly.
Perhaps a problem of any cache ?

@NateBrady23
Copy link
Member

It looks like the location of the files in the archive changes? The ones listed in the logs are no longer at that location. Let's see what it does on the next time around.

@NateBrady23 NateBrady23 self-assigned this Dec 24, 2018
@joanhey
Copy link
Contributor Author

joanhey commented Dec 27, 2018

php7.3.0-1.... don't exist anymore, now it is php7.3.0-2.....

In travis isn't failing because it recreate the first docker and later use the cache.

Here create it the first time:
https://travis-ci.org/TechEmpower/FrameworkBenchmarks/jobs/470580086#L732
And later use the cache:
https://travis-ci.org/TechEmpower/FrameworkBenchmarks/jobs/470580086#L861

But the tfb-status use the same cache in any new run:
https://tfb-status.techempower.com/unzip/results.2018-12-26-15-03-16-248.zip/results/20181223230515/cakephp/build/cakephp.log

cakephp: Step 4/18 : RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
cakephp:  ---> Using cache
cakephp:  ---> 4e6439e5b859
cakephp: Step 5/18 : RUN apt-get update -yqq  > /dev/null
cakephp:  ---> Using cache

CakePHP is the first framework in tfb-status that install php7.3.

@NateBrady23
Copy link
Member

Oh, I see now. I won't be in the office for another week. We bust the cache after a few runs but if it's not busted by the time I go in, I'll do it manually.

@joanhey
Copy link
Contributor Author

joanhey commented Jan 2, 2019

Solved.

Looks like in one run, anybody cleaned the docker cache in the middle of the run. As only the last half of php frameworks installed correctly php.

If the tfb-status don't clean the docker cache before each run, it's very important to indicate in which runs the cache was cleaned.

@NateBrady23
Copy link
Member

Good point @joanhey - I don't think we check during the tests, and someone may have done it manually, but will verify with the team on Monday.

@NateBrady23
Copy link
Member

@joanhey We don't bust the cache during a run, only between full runs. Not 100% sure what happened during the run that would have made the last half of php frameworks pass. Going to close this for now.

@raziel057
Copy link
Contributor

Do you know why we always got error in some of PHP Frameworks (lumen, symfony, ...) ? Is it related to the cache?

It's visible in the 3 last runs:

Errors are presents for benchmarks with database (Single Query, Multiple Queries, Fortunes, Data Updates).

@zloster
Copy link
Contributor

zloster commented Jan 9, 2019

@raziel057 Check out the logs if the frameworks are affected by #4092.

@joanhey
Copy link
Contributor Author

joanhey commented Jan 9, 2019

All the php frameworks that have errors with the db benchmarks, are because don't use persistent connection to the db.

I tried my best to update all the frameworks to use persistent connection, but in some frameworks I can't find how to do it. #3658
And all that changed to use persistent connections, they immediately stopped having errors.

And the logs don't show info about that.

@joanhey
Copy link
Contributor Author

joanhey commented Jan 9, 2019

They just can not connect quickly to the bd.
In citrine the database is in another server. Without persistent connection they need to open a new TCP for every db consult. And that is very expensive.

@raziel057
Copy link
Contributor

It’s strange because there were no problem in previous round. Here for example:
https://www.techempower.com/benchmarks/#section=data-r15&hw=ph&test=fortune

@joanhey
Copy link
Contributor Author

joanhey commented Jan 10, 2019

In previous rounds the nginx configuration was not optimized.
Only 8 worker_processes, now uses auto (1 worker per CPU core). Citrine have 24 cores.

But the worst was that nginx was using TCP, without keep alive (persistent connection) to the php-fpm.
So again, for every request from nginx to php-fpm it's necessary to create a new TCP connection.
Now uses keep alive and unix sockets. The unix sockets are faster and the gain using keep alive it's less. But still we have 5 system calls less for every request, with 300.000 req/s x 5 system calls = 1.500.000 system calls per second that are not necessary.

Before simply nginx didn't send enough food (requests) to the php-fpm.
Every connection to php-fpm was using a new TCP connection, slow enough to php have time to create a new TCP connection to the bd.

Check the numbers from Round15 vs the last run.

Fortunes:

Framework Round 15 Last run
Php-raw7 34,595 122,695
Slim 9,081 26,380

Json:

Framework Round 15 Last run
Php7 38,497 251,106
Slim 17,384 35,439

Always it's recommended to use persistent connections, but a necessity if your database it's in another server.
Any website with big traffic, the first recommendation it's separate the bd in another server.

The worst thing, it is that was very difficult to find the info for use persisten connection, in most frameworks.
That info will be easy to find and recommended when your bd it's in another server.

And that Doctrine don't permit persistent connection, It's a very wrong technical decision.

PD: @raziel057 the next time open a new issue, because the title of this issue is not about that.

@raziel057
Copy link
Contributor

@joanhey Thanks you for the clarification.

@joanhey
Copy link
Contributor Author

joanhey commented Nov 9, 2022

@raziel057 Check Symfony 700% faster with Workerman.

https://github.com/joanhey/AdapterMan

@raziel057
Copy link
Contributor

@joanhey Wouahou that’s huge! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants