1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Basic questions about Cache systems & XenForo

Discussion in 'Server Configuration and Hosting' started by TheBigK, Apr 28, 2014.

  1. TheBigK

    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?
     
  2. estranged

    estranged Well-Known Member

    There is no definitive answer. I prefer xcache as opcode and data cache. It works good for my single server setup.
     
  3. TheBigK

    TheBigK Well-Known Member

    ...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?
     
  4. estranged

    estranged Well-Known Member

    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".
     
  5. Floren

    Floren Well-Known Member

    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
     
  6. TheBigK

    TheBigK Well-Known Member

    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 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?
     
  7. Floren

    Floren Well-Known Member

    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.
     
  8. TheBigK

    TheBigK Well-Known Member

    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.
     
  9. Floren

    Floren Well-Known Member

    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?
     
  10. TheBigK

    TheBigK Well-Known Member

    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.
     
  11. Floren

    Floren Well-Known Member

    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.
     
  12. Tracy Perry

    Tracy Perry Well-Known Member

    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.
     
  13. TheBigK

    TheBigK Well-Known Member

    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?
     
  14. Tracy Perry

    Tracy Perry Well-Known Member

    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
    .
     
  15. TheBigK

    TheBigK Well-Known Member

    I got PHP 5.5 and also have Zend Optimiser running. Do I need to add anything to configuration file?
     
  16. RoldanLT

    RoldanLT Well-Known Member

    No.
     
    TheBigK likes this.

Share This Page