5

Anyone have an idea of how to speed up CiviCRM PHP execution time ?

I'm an administrator of CiviCRM on Wordpress production set-up, and I find it too slow. I've conducted a little investigation using NewRelic and the whole execution time of (around 2,000ms per request in average) is due to Php execution. All the requests below are CiviCRM's (all URLs are of this type /wp-admin/admin.php?page=CiviCRM)

?NEW RELIC SCREENSHOT

I'm running an SSD server with 2CPU@3.1Ghz + 7G RAM, with only one Wordpress&CiviCRM running on an Ubuntu 16.04, Php5.6, MariaDB, Nginx, Memcached, and FPM with 25 workers. The whole system is using under 40% of RAM, 10% CPU, for an average load of around 0.3. I find it hard to believe that the server is under-sized.

Thanks for any input on that issue !

  • 2
    Are you able to use PHP7? Civi is compatible as of a few months back, and PHP7 is significantly faster. – Andrew West Jan 17 '17 at 12:49
  • 1
    Have you configured CiviCRM to take advantage of memcache? – Coleman Jan 17 '17 at 19:24
  • I'm late answering this : switching to PHP 7 was a huge performance boost ! – Elias Sh Feb 13 '18 at 16:00
3

This would appear to be a fairly general question of Linux server optimization, which is a complicated subject. The details of such optimization depend on a myriad of factors and settings and is, generally speaking, not the kind of thing that can be answered on a site like this--it depends as much upon the hardware as it does on the software and settings.

To optimize your server would require an analysis of your server and its details by a sysadmin with Ubuntu experience.

  • 1
    New Relic can really help the OP carry out this task, its pretty good at helping identify longer running code and giving a break down as to what is going on in which areas of the app. – Parvez Saleh Jan 18 '17 at 16:13
3

If you're lucky, you just need to turn on the php op-code cache. My experience using on Centos6 was that it wasn't on by default. But I'm intrigued if your slow execution time is specific to CiviCRM. If it isn't, your server specs sound reasonable, but there are many devils in the details, and I'd tend to agree with Hershel that you should go back and make sure your server is correctly setup before involving CiviCRM in the diagnosis. You should likely be aiming for a php response time under 500ms.

  • I agree that the op-cache seems like a likely thing to be looking at, particularly as almost all the execution time is showing as being in PHP, not in MySQL. – mc0e Feb 12 '18 at 17:57
1

We run newrelic to monitor most of our servers, your stats look very slow compared to what we normally see. It looks to me as though theres some performance issues specifically with your instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.