Basic questions about Cache systems & XenForo

TheBigK

Well-known member
I'm bit confused about the cache systems I should have on my server for optimum xenforo performance. First - there's OpCode cache, then we have [BD]Cache and also have LiteSpeed Cache (for those who use LiteSpeed server).

Can someone offer a definitive answer to what should I really setup for the best performance?
 
There is no definitive answer. I prefer xcache as opcode and data cache. It works good for my single server setup.
 
There is no definitive answer. I prefer xcache as opcode and data cache. It works good for my single server setup.

...I have a single server too; so I guess memcache has been ruled out. My primary questions are-

1. Is it 'good' to run all of these cache/addons together?
2. If not, which would give me the best of the performance from my server?
 
As far as I know they can be used together as each of them do different things than xcache. I only use xcache. You have to configure it in config.php to benefit from data caching. And then in the "Performance" settings you should enable "Fetch public templates as files" and "minify CSS".
 
Can someone offer a definitive answer to what should I really setup for the best performance?
You will get millions of different answers. This is what I always set, regardless if single server or not:
1) Nginx Cache for guests
2) Memcached
2) OPCache + libmemcached + igbinary
 
Alright, I did a bit of reading and found that XenForo.com itself has APC enabled; but no settings have been added to config.php. This is what Kier said:

[Tip] Use APC
I'd like to make myself clear on this - I personally do not recommend that you use APC for shared memory caching via your config file.

We use APC here for its opcode cache only, which it does automatically by virtue of being installed on your server. I do recommend that you have APC installed, for its opcode cache, which will massively speed up your page loads vs a system without APC.

If you want to use a shared-memory cache system, I'd recommend memcache, not APC.

I wish to know if this still holds true. Perhaps @Brogan may know.

I've asked my host to install APC on my server; but I'm not going to touch config.php. Is that okay?
 
I personally don't use anymore APC, since OPCache is part of PHP and maintained actively... but that is me. Zend OpCache is more performant than APC and more reliable. However, Zend OpCache does not have a shared user memory cache. To fix this, a new extension apcu has been released, which provides just the user caching. I personally don't use it.
 
I personally don't use anymore APC, since OPCache is part of PHP and maintained actively... but that is me.
Alright, I admit that I'm getting a bit more confused. I had read that PHP OPCache will be enabled by default. I'm on PHP 5.4. Will I still benefit from APC?

There are several posts here that say 'memcached' is for multiple server setup.
 
OPCache is available on PHP 5.5, if you need to run an old version of PHP then APC is the way to go.
But then, why would you want to use an old version, when PHP 5.5 has so many improvements?
 
OPCache is available on PHP 5.5, if you need to run an old version of PHP then APC is the way to go.
Hmm, would you recommend upgrading to php 5.5 than running 5.4+APC? I run only XF and WordPress on the server; so compatibility shouldn't be an issue. I'll have to check with LiteSpeed folks though, I guess.
 
There are plenty of users here who use Open/LiteSpeed with PHP 5.5.
I personally use Nginx as I'm used to it... and is free.
 
Hmm, would you recommend upgrading to php 5.5 than running 5.4+APC? I run only XF and WordPress on the server; so compatibility shouldn't be an issue. I'll have to check with LiteSpeed folks though, I guess.
I'm running 5.5.11 with OpenLiteSpeed 1.2.9 on 4 WordPress sites, 3 XenForo sites and 3 (on one OLS instance) myBB forums. Works fine.
 
I'm running 5.5.11 with OpenLiteSpeed 1.2.9 on 4 WordPress sites, 3 XenForo sites and 3 (on one OLS instance) myBB forums. Works fine.
Thanks @Tracy Perry . I've decided to opt for PHP 5.5 instead of using APC. Did you have to edit the config file to enable cache settings? Or will the things work out of the box; without touching the config file?
 
Thanks @Tracy Perry . I've decided to opt for PHP 5.5 instead of using APC. Did you have to edit the config file to enable cache settings? Or will the things work out of the box; without touching the config file?
Standard compile of PHP 5.5.11 should build the OPCache, but if it doesn't there is a compile parameter for it.
I also had to enable it in the php.ini (this is with OLS 1.2.9 - 1.3 has an option in the compile setting page but 1.3 gave me other problems) with
Code:
zend_extension=/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20121212/opcache.so
.
 
I got PHP 5.5 and also have Zend Optimiser running. Do I need to add anything to configuration file?
 
Top Bottom