The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Resolved] Memcache, filecache, diskcache and Eaccelerator combinations

Discussion in 'Workarounds and Optimization' started by DavidR, May 18, 2013.

  1. DavidR

    DavidR Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    I have a VPS with a fairly active WP site. I'm going to install Eaccelerator via Easyapache. My question is, should I have these other options enabled as well (filecache, memcache & diskcache)? I've found a few posts that come close to an answer but nothing really that helps me understand which to use and why.

    Thanks.
     
  2. GIANT_CRAB

    GIANT_CRAB Well-Known Member

    Joined:
    Mar 23, 2012
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hey DavidR,

    The daemon memcache is actually more memory intensive.
    Secondly Memcache/MemcacheD, filecache, diskcache is not an Opcode Cacher.
    It is a distributed memory caching system.
    It does not improve the performance of your PHP code.
    It can be used to store data temporarily only.

    This is how it works:

    HTTP request -> Apache -> PHP -> Memcache -> Memcached

    So the PHP data is stored in the memory as memcached daemon.
    You can learn more about Apache caching modules here - Caching Guide - Apache HTTP Server

    For OPcode cachers such as Eaccelerator, APC, xCache:

    Eaccelerator:
    • Now coded and supported by community. (Used to be coded by one man but he left the project for several years)
    • Only works on mod_dso (Not secured if your VPS is also being used by other strangers)
    • Easy compilation via EasyApache
    • Performance wise, its not really the best.


    APC:
    • Coded and supported by PHP developers. (The people developing for PHP)
    • Works on mod_dso, mod_fcgi and mod_cgi
    • Manually installation using yum
    • Performance wise, its the 2nd best but it is supported by PHP developers. (This project will not die unless the PHP developers give up on it)


    xCache:
    • Coded and supported by a few people from the Lighttpd community and developer team.
    • Works on mod_dso, mod_fcgi and mod_cgi
    • Easy compilation via EasyApache
    • Performance wise, its the best.


    I would actually recommend you to install xCache.
    After installing xCache, open up the php.ini via SSH terminal and then edit it.
    You can look at the configuration provided here - XcacheIni – XCache

    Please let me know if I've answer your question :P
     
  3. DavidR

    DavidR Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    Wow, thanks for the quick and detailed answer. I will read over that information and mess with it tomorrow, after which I may have an intelligent question or two. In the mean time, as they do different things, is it recommended to install any of the others (Memcache, filecache, diskcache) along with xcache? I seem to remember reading that memcache improved mysql performance, but I'm not up to speed on that. Thanks again.
     
  4. GIANT_CRAB

    GIANT_CRAB Well-Known Member

    Joined:
    Mar 23, 2012
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Well, if you have plenty of resources (RAM) to spare, you can increase performance through caching.
    However, it may not be very significant, maybe slight I/O improvement.

    Caching is just to decrease workload and not really to increase performance, but yes it does, slightly.
    If you want significant performance improvements, you gotta increase your hardware expenses.
    RAID 1010 SSD SAN setup for SQL? You'll probably reach 1000 I/O but its expensive as crazy.

    You can follow the guide on Apache caching here:
    Apache 2.2 - Caching Guide - Apache HTTP Server
    Apache 2.4 - Caching Guide - Apache HTTP Server

    Just a small note, there are certain limits on caching and its restricted by your system resources.
    So it is not really possible to cache a file that is 100MB, it'll blow up your system.
     
    #4 GIANT_CRAB, May 19, 2013
    Last edited: May 19, 2013
  5. DavidR

    DavidR Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    Thanks again for your helpful information. After reviewing the information and your advice, I've decided to leave those other things off and just run xcache, with a Wordpress plugin such as W3TC to help utilize it. Take care.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page