[Plugin: W3 Total Cache] xCache Support
-
Hi,
Is there a reason APC is the only supported OPCode cache? I, along with many people, prefer to use xCache and would love to see xCache support built in.
Thank you.
-
I believe you can set xcache.admin.enable_auth to “off” in the .ini
Here is what XCache says about it:
xcache.admin.enable_auth string
Disable XCache builtin http authentication if you plan on handling authentication yourself. Be aware that any vhost users can set up admin page, if builtin http auth is disabled, they can access the page with out any authentication. So it is suggested that you disable mod_auth for XCache admin pages instead of disabling XCache builtin auth. This option is 1.2.x only since 1.2.1Thanks.
I also found in the W3TC “install” page, within WordPress, a path to a pre-written xcache.ini file for /etc/php.d/ which I hadn’t seen before. It includes the user/pass pair we’re discussing.I’ve put that file into that directory, after uncommenting these lines, and putting my password in using its hashed form:
;xcache.admin.user = "admin" ;xcache.admin.pass = "hash-password-here" ;xcache.admin.enable_auth = On
Restarted Apache.
However, W3TC still asks for a name/password.I have left the first few lines as-is from the W3TC-provided ini, because I don’t understand them. I have loaded xcache directly rather than as a function of Zend.
; /etc/php.d/xcache.ini ;extension = xcache.so zend_extension = "/usr/lib/php/modules/xcache.so" zend_extension_ts = "/usr/lib/php/modules/xcache.so"
Any suggestions?
First, those lines youv’e shown are commented out, second you can change
xcache.admin.enable_auth = On
toxcache.admin.enable_auth = Off
if you uncomment it.Hi Frederick, my mistake, I pasted in the lines before I had removed the comment marker. When I tested it, those three lines user/pass/auth were uncommented.
If they were uncommented in my environment (CentOS 5.4, 64-bit, Kernel version 2.6.18-164.11.1.el5, Apache version 2.2.16), does it otherwise look correct? Since I had the authentication request when I tried clearing cache, I figured there must have been something wrong in the ini file or its location.
I didn’t want to stop the authentication because I couldn’t assess the risk that c3mdigital had outlined.
It does otherwise look correct. I’m personally not a fan of xcache, I only use it under special circumstances, so I don’t have any further troubleshooting tips off the top of my head.
Thanks for your help Frederick.
FYI to others. I found that my xcache.ini file was not been loaded at all, because (I expect) my php.ini file had the xcache settings in it.
I found the location of my php.ini file by checking a phpinfo.php page, looking for the line “Loaded Configuration File”.Within it was, strangely, already a name/pass pair… most bizarre it isn’t being recognised! Maybe the md5 is wrong.
Thanks for letting us know.
Does anyone know of a solid tutorial for installing xcache on a (dv) at mediatemple.net – or for CentOS in general?
Thanks.
Please disregard that last question, I was able to install it successfully – it now shows as being installed on the compatibility check.
That said, is there a “best config” for xcache/memcache for a dedicated virtual server setup?
For example: What are the best settings for:
Page Cache – disk, disk enhanced, xcache, or memcache?
Minify – disk, xcache, or memcache?
Database Cache – disk, xcache, or memcache?
Object Cache – disk, xcache, or memcache?I’m sure it depends on a lot, but is there a “default best”?
Thanks!
Generally disk enhanced always performs better for page cache. For minify I haven’t been able to see much difference between disk, XCache or Memcache. For DB and Object I have gotten my best results using memcache.
My suggestion is to test different combinations using Apache Bench. To run it:
$ ab -n 1000 -c 10 https://example.com
The number after -n sets the amount of requests and the -c is the concurrency level.I always restart Apache after each run and visit the page to rebuild the cache.
Great, thanks. That is also the config I settled on after some basic trial and error last night.
Page = disk enhanced
Minify = disk
Database = memcache
Object = memcacheFor the record, I’m running on a dedicated virtual server hosted with MediaTemple.net.
xcache should be faster than memcached in your case.
I’ve had the plugin running for just under two weeks now and I’m impressed with it. Thing is, I’ve had to switch from using xcache to disk because otherwise I’d have to tell my editors my xcache password. That isn’t something I want to do really. I also definitely don’t want to disable the auth process completely.
I’m on a dedicated server and although I realise it’s best to rely on disk enhanced for page caching, I’m pretty certain xcache is better for database and object caching. Is running database and object caching on disk going to cause a huge bottleneck compared to not caching them at all?
You can remove the need for authentication from xcache. Using opcode and opcode caching for database/object cache is a great performance win for high traffic sites with lots of comments or even a few.
- The topic ‘[Plugin: W3 Total Cache] xCache Support’ is closed to new replies.