Jump to content

PHP 7 and Opcache with ¿Memcached, APCu or Redis?


seog

Recommended Posts

Hello

 

I attach my current setting for request a suggestion about that cache could be more fastest:

 

PHP 7.0.18

OPcache 7.0.18

Prestashop 1.6.1.13

Adititonal Cache module installed

Page size 512KB with 37 request 

Current Gtmetrix fully loaded time 3,4S

Mysql Database weight 100MB (600 products)

 

 

¿Better in my case APCu, Memcached or Redis?

 

Best regards

Link to comment
Share on other sites

Which additional cache module is installed ?

 

PS 1.6.1.13 is having some speed problems in back-office. I noticed this yesterday on an upgraded customer shop. I did a rollback to 1.6.1.12

 

For best speed Prestashop 1.6.x:

php-version 5.6+ (5.4.5 at least, cause this includes opcache). If opache is activated, you do not need any other old php-cache module (xCache, APC, eaccelerator, etc).

If you are using php 5.6. than you can tune the speed with php-fpm + fast-cgi +ngnix over apache (nginx as webserver).

If you need more speed than you can tune the opcache with the following changes:

opcache.revalidate_freq=0
opcache.validate_timestamps=0 (comment this out in your dev environment)
opcache.max_accelerated_files=7963
opcache.memory_consumption=192
opcache.interned_strings_buffer=16
opcache.fast_shutdown=1

If you need moreover speed, than I suggest to use load balancer, nginx pure servers, or add to the configuration named before also memcache, for load balancing on traffic browser sided.

 

php7 is also a fast solution, but if you are running some other software on your server besides Prestashop, you need to check if it runs under php 7. You can also use php7 and make the same tuning I named before.

Link to comment
Share on other sites

Hello @selectshop.at

 

Module express cache v3.2 was installed. I havent php 5.6, i resume my software:

 

PHP 7.0.18

OPcache

Prestashop 1.6.1.13

 

I have installed at the moment redis.ini in php 7. 

 

Do you suggest me Memcached or APCu instead of Redis ?

Would be compatible have Redis and Memcached enabled?

 

Best regards

Link to comment
Share on other sites

Sorry, but I don't have experience with Redis.

In this case I will take memcache, cause it acts on browser requests, so not on your server directly. I think with fast-cgi + php-fpm + fast php versions like 7 + nginx over apache + memcache you will get the best from all (fast software, fast cache code sided, fast cache user sided, load balancing in middle style). The only thing missing here is optimization of database (Redis). But I never touched this, I simply used latest mySQL version and for me it's fast enough (also on a shop with 20.000 products and over 3.000 product combinations)

 

Another possibility is to use pure nginx, here you have the best load balancing, so load balancing in big style + redis. Other caching don't think it is necessary.

  • Like 1
Link to comment
Share on other sites

opcache.revalidate_freq=0
opcache.validate_timestamps=0 (comment this out in your dev environment)
opcache.max_accelerated_files=7963
opcache.memory_consumption=192
opcache.interned_strings_buffer=16
opcache.fast_shutdown=1

 

Do you can confirm me if this tuning for opcache is best option for PHP 7.0.18 and PS 1.6.1.13?

These modifications should be in /opt/plesk/php/7.0/etc/php.d/10-opcache.ini ?

 

Best regards

Link to comment
Share on other sites

This tuning is best for opcache, indifferent of the php-version in use. In production I'm running 5.6.30 and not php 7, cause some other software on the server is incompatible with php 7. Cannot force customers to user other software, just for the reason that I want to upgrade my server. This is not the way I work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...