Increase the performace of cakephp 3

I am using cakephp 3.0.11 with PHP 5.4.45-0+deb7u8 and Server side nginx 1.2.1.

Each page take loading time between 1.2 s to 2.0 s. I want to reduced the loading time under 1s.

To try reduce loading time with introduction to cache in cakephp, Then I configure Memcached in my project. But still not any improvement in loading time of cakephp page.

In Debug kit most time taken script was Core Processing (Derived from $_SERVER[“REQUEST_TIME”]) between 600ms to 900 ms.

May someone help me out to reduce above time plus View render time, so that my project load in 500 - 700 ms.

Thanks

You are using a very old version of both CakePHP, and PHP. The easiest way to get faster performance is to upgrade to PHP 7 (You’re looking at a 100%+ improvement in performance), disable xdebug on your production system, and ensure that the debug mode is disabled for your application. Also, ensure that you upgrade to the latest version of CakePHP for optimum performance, and security.

From there, you need to start looking at your application. Get some kind of profiling and application monitoring in place, I would recommend blackfire.io for profiling, and newrelic.com for application monitoring. Both are fantastic tools, and offer trials and free plans which should be enough to help you to find the cause of the slowness.

Our large (100 000+ lines of code) CakePHP 3 application has response times of ~180ms, with minimal caching.

1 Like

Thanks for reply. I am working on product with dual core Arm CPU architecture 1Ghz with one 1GB ram from last 2 years, that why my PHP and Cakephp version are old.
Management not want to change hardware and base code. I run same code on i5 or i7 processor, their response time was same as you mentions in reply.

May you guide me how I tune php setting or any hardware setting, so get maximum output from server.

Thanks again

With such a low spec server, PHP 7 is your best bet/only option. Not sure what OS you are running, but you should quite easily be able to compile PHP 7.1 for your hardware. PHP 7 uses less memory, and executes faster than any previous version of PHP.

And you should tell your management that they need to upgrade the base CakePHP version for security :slight_smile:

1 Like