Zend opcache question

clubpromos

Active member
Hi,

I use PHP Version 5.6.12 and Zend Opcache is enabled.
Is there anything specific that I need to add to my config.php file for Xenforo? (I thought not but now I have a doubt).

All I have in my config.php is:
Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';

Screenshot_1.webp

Am I missing something?

Thanks
 
XenForo (Zend) cache options have nothing to do with Opcache.

If you want to change the Zend cache from the default file cache to something else, you need to configure that in XenForo's config.php

See:
Defining a Cache | XenForo
 
Ok, so Opcache works with PHP anyway.
So if I want even better cache I need to use memcached or APC (not sure if that works with PHP5.6 and my configuration. That's what you mean?
 
Should I expect significant improvements by adding memcached in your experience?

Opcache with memcached will make your page loads very fast. Check the page loads on one of my sites (signature) and see if you like the speed. I also use nginx as a proxy to apache.
 
Should I expect significant improvements by adding memcached in your experience?
Sure. I recommend Opcache+Memcached, definitely you (and your server) will notice it.

I get much better results with redis instead of memcached for wp sites but redis is not officially supported in XenForo.
 
At least in my setup I have to activate opcache in php.ini:
Code:
; Determines if Zend OPCache is enabled
opcache.enable=1
 
I get much better results with redis instead of memcached for wp sites but redis is not officially supported in XenForo.

Can you quantify that?

Whenever I've benchmarked them, they're about equal, it's just redis was a lot more convenient to develop against because of all the extra data structures it supports.
 
Thanks all for your responses.
Would someone be able to share how they have their memchached configured in config.php?

Code:
$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
    'compression' => false,
    'servers' => array(
        array(
            // your memcached server IP /address
            'host' => 'localhost',
           
            // memcached port
            'port' => 11211,
        )
    )
);
 
Can you quantify that?

Whenever I've benchmarked them, they're about equal, it's just redis was a lot more convenient to develop against because of all the extra data structures it supports.
Just subjetive experience, I did not measure the performance scientifically. But it feels noticeably faster in my setup. Maybe the plugin affects this result (Redis object cache vs. Memcached is your friend). A good advantage of redis vs memcached is the persistence support, specially for small sites.
 
I ended up with "An exception occurred: The memcache extension must be loaded for using this backend !"

I think that it would have been much clearer if the documentation said that memcache (without 'd') MUST be installed and loaded too.


I performed a quick test on server response time which I was hoping to improve a little bit but it turns out that it didn't help at all for response time to enable memcache (d).
 
Last edited:
I ended up with "An exception occurred: The memcache extension must be loaded for using this backend !"

I think that it would have been much clearer if the documentation said that memcache (without 'd') MUST be installed and loaded too.


I performed a quick test on server response time which I was hoping to improve a little bit but it turns out that it didn't help at all for response time to enable memcache (d).

Memcached helped more with page load times for me, no response times.
 
I was about to add this. I think that there is an improvement in page loads yes, Not very much but it's there.
I'm still trying to find a solution to the server response time (not using a cheap server).
 
Back
Top Bottom