5

We're provisioning a new server and are deciding between (php7 / opcache) and (php5.6 / xcache).

We run a few chunky ecommerce sites and want the best possible performance.

I'm looking for comparative results between the two, but cant find any anywhere.

Does anyone have experience in the two side by side?

Tim
  • 53
  • 1
  • 4
  • 1
    You're probably not going to find many comparisons between the two caches, as they're both going to be quite zippy as memory stores. You will, however, find *many* PHP5 vs PHP7 benchmarks, and you'll find that PHP7 almost universally sees significant performance increases. Go with PHP7. – ceejayoz Apr 08 '16 at 01:00
  • 1
    Plus, PHP 5.6 will only receive active support for 8 more months (security support's going to last longer, but still). http://php.net/supported-versions.php – ceejayoz Apr 08 '16 at 01:01
  • I guess the lack of object/session caching in opcache was my main worry. – Tim Apr 08 '16 at 02:26
  • In my experience, that sort of stuff most people are handling via something like Redis now. – ceejayoz Apr 08 '16 at 02:31
  • Yes, go PHP7, if your e-commerce platform supports it. Backend caching can indeed be done with Redis like caching. And use something like Varnish or Nginx to cache output so you don't have to hit PHP and MySQL. And of course, if this choice is mission critical to you, why not spin op some VMs and benchmark yourself? – JayMcTee Apr 08 '16 at 07:39
  • Thanks everyone. Caching is tricky with highly dynamic product data, but I'll check out Redis too. We installed php7. – Tim Apr 14 '16 at 04:02

1 Answers1

5

In terms of comparative results, Zend Opcache was already better than xcache since php 5.5.

Find a coparison here: http://massivescale.blogspot.ro/2013/06/php-55-zend-optimiser-opcache-vs-xcache.html but you have the graphs below in case reference goes away in time.

So conclusion is: the (slightly) better choice is opcache since php 5.5, and if you add the fact that php 7.x is faster in itself, php 7 + opcache is the way to go without any doubt.

Graphs:

Time graph: less is better

Requests per second graph: more is better

Radu Herinean
  • 96
  • 1
  • 3