We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Performance problems when upgrading from PHP7.1, Phalcon 3.3.0 to PHP7.3 Phalcon 3.4.3

Hi, We tried to upgrade from php7.1 to 7.3 and had performance issues performance degraded 15%~30% depending on sites we serve

We moved from:

PHP 7.1.12-3
Phalcon 3.3.0
Nginx 1.4.6 (according to phpinfo())
ubunto 14.04

to :

PHP 7.3.5-1
Phalcon 3.4.3
Nginx 1.15.12
Ubunto 18.04

The same happens with other versions of Nginx/Ubunto Any ideas what might cause it?



85.5k

make sure your benchmark is correct, because there are many things that are different based on the infomation you provided

edited May '19

I take microtime at the begining and at the end of the controller. The regression happens even when Nginx and Ubunto are the same (meaning Only PHP and Phalcon have changed). This is also notable in Newrelic monitoring.

Would love to get ideas on where can I investigate

make sure your benchmark is correct, because there are many things that are different based on the infomation you provided



85.5k

best would be to create a isolated ( and simple / very short ) example. Test it on both places and check if there is a difference.

There is a difference in the performance in the framework, but its so small that It should not be visibile.

My pure guess would be that your mysql is slowing things down

Hi Izo Firsr of all, thanks for your effort :-) I'm using same redis for both cases (no mysql). You mentioned a difference in performence. Is it Phalcon 3.4 Vrs earlier versions? can if be mapped to do's and don'ts? I'm hopping to heare from the community, Are there known issues in php7.3 that can cause this (e.g. diffrence in error reporting, depprecated functions, etc.)

thanks again Yariv

How about hardware? Did you changed it? Also probably it can be configuration issue. Let's say opcache is not enabled or xdebug enabled.

edited Jun '19

Well you changed OS and nginx as well, so there might be many things that went wrong, like even your OS configuration or hardware itself if it's some kind of cloud.

I saw even differences on cloud providers were theoritcally same configuration could potentially have such performance difference, because simply not all servers are always using exactly same CPU.

Thanks,

I'll double check the configuration I'm running on same hardware (using dockers on AWS)

How about hardware? Did you changed it? Also probably it can be configuration issue. Let's say opcache is not enabled or xdebug enabled.

Thanks, same results happend with same OS/Nginx. I'm planning another try cycle with different docker configuration, will update....

Well you changed OS and nginx as well, so there might be many things that went wrong, like even your OS configuration or hardware itself if it's some kind of cloud.

I saw even differences on cloud providers were theoritcally same configuration could potentially have such performance difference, because simply not all servers are always using exactly same CPU.

Can you do some profiling to better understand where performance degraded

Can we use it in any profile on website? I want to use with my tools reviews website. Kindly guide.

Then there is something coming out of your database. Perhaps a field that can not be null or some data inconsistency there. Check what information you send in and test the entire SQL statment that you integuide https://forum.phalcon.io/discussion/19975/api-rest