[Resolved] Memcache, filecache, diskcache and Eaccelerator combinations

DavidR

Well-Known Member
Feb 25, 2003
177
0
166
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.
 

GIANT_CRAB

Well-Known Member
Mar 23, 2012
89
0
56
cPanel Access Level
Root Administrator
Hey DavidR,

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

DavidR

Well-Known Member
Feb 25, 2003
177
0
166
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.
 

GIANT_CRAB

Well-Known Member
Mar 23, 2012
89
0
56
cPanel Access Level
Root Administrator
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.
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.
 
Last edited:

DavidR

Well-Known Member
Feb 25, 2003
177
0
166
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

I am happy to see a solution has been provided. I've tagged this thread as [Resolved].

Thank you.