Here with this website we are showing you settings with XCache, W3 Total Cache WordPress on a somewhat high end setup on Rackspace Cloud Server. Frederick Townes is somewhat known person to us, it is obvious that we might criticize a plugin or their business model, but actually he is a good person. Many years ago, it was Frederick Townes who mentioned us on W3TC’s other notes (2012) :
1 | http://wordpress.org/plugins/w3-total-cache/other_notes/ |
Definitely there are two plugins for WordPress Caching – W3 Total Cache and WP Super Cache. We also criticize Rackspace despite their excellent support. Piwik became bad because less people criticized – things are written with guide! So, Nginx – PHP5-FPM setup with 2 GB PVHVM Server as web server and 1 GB PVHVM server as MySQL Server and all possible stuffs from Rackspace. The linked Piwik guide will give you link to the other needed guides. We do not change any default files’ name. It is high end for WordPress considering the average CPU load and other metrics. Obviously it is possible to use Rackspace OnMetal with 128 GB RAM as Web Server and with 512 GB RAM as Application Server – around $2000 USD per month plus cost of bandwidth. But if you check traffic : processor core ratio, we are using high end server.
Why XCache and W3 Total Cache WordPress on High End Setup Needs Consideration
For WordPress, you should not use XCache as an alternative of Disk Cache Enhanced for Page Caching. XCache is blazing fast, but even with 128 GB + 512 GB RAM combo offer, there is enough chance of hit and miss. XCache is fast but it sucks memory and takes huge time to build the Cache. So, the place of XCache in any high end setup is for object Caching. Otherwise your Time To First Byte (TTFB) will be very poor (if you use XCache for Page Cache) :
---
1 | http://www.webpagetest.org/result/140903_HF_176B/1/details/ |
The website in real loaded quite faster, but on computerized tests; actually it becomes bad. Somewhat good after Page Cache set to Disk Enhanced :
1 | http://www.webpagetest.org/result/140903_3P_17FH/1/details/ |
Keep in mind – this is a full HTTPS setup. Practically if there is a HTML page, the server will less likely to die if 200 opens one particular webpage at the same time. Unfortunately, this theory fails as during the building of cache after post publication, the rush comes on the new post. Still, it (Disk Cache Enhanced for Page Cache) is better option than remaining kind of naked. As our disk I/O is very good, read-write cycle technically becomes better with Disk Cache Enhanced. A GET request => Cache Present => Served. PHP5-FPM almost has no work. But, if you keep only XCache in front, all traffic will go through that fast cgi block of Nginx server config file. If there is no Cache, its quite difficult to logically define unlike Disk Cache Enhanced (on Nginx setup). It is not abnormal to get this kind of graph :
1 | http://tools.pingdom.com/fpt/#!/cjL4Zo/https://thecustomizewindows.com/2014/09/delete-mysql-database-from-command-line/ |
Only Disk instead of XCache for Object Caching is possibly a bad idea as the Hard Disk will actually be seek more and more. So the settings becoming :
1 2 3 4 5 | Page == Disk Enhanced Minify == Disk Database == No Cache (InnoDB Engine) Object == XCache CDN == Akamai |
The XCache thing requires further tweak.
XCache and W3 Total Cache WordPress : Setup
In Nginx Installation guide and later tweaks (search our web site with the thing you want), we actually installed XCache. If you run this command :
1 | php5 -v |
You will get an output like this :
1 2 3 4 5 6 7 8 | PHP 5.5.9-1ubuntu4.3 (cli) (built: Jul 7 2014 16:36:58) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with XCache v3.1.0, Copyright (c) 2005-2013, by mOo with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies with XCache Optimizer v3.1.0, Copyright (c) 2005-2013, by mOo with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo with XCache Coverager v3.1.0, Copyright (c) 2005-2013, by mOo |
With Ubuntu, you need not to fight much. You only need to locate the settings file :
1 | locate xcache.ini |
You’ll get an output like this :
1 2 3 4 5 | /etc/php5/cli/conf.d/20-xcache.ini /etc/php5/fpm/conf.d/20-xcache.ini /etc/php5/mods-available/xcache.ini /usr/share/doc/php5-xcache/examples/xcache.ini ../../../../wp-content/plugins/w3-total-cache/ini/xcache.ini |
The last one is the file written by Frederick Townes for W3TC, only two must be commented out in this fashion :
1 2 3 | ;xcache.admin.user = "mOo" ;xcache.admin.pass= "hash-password-here" xcache.admin.enable_auth = Off |
The path of W3TC’s specific file by default Nginx setup is :
1 | /usr/share/nginx/html/wp-content/plugins/w3-total-cache/lib/W3/Cache/Xcache.php |
With increasing load actually a better result should be expected :
1 | http://tools.pingdom.com/fpt/#!/I0m1r/https://thecustomizewindows.com/2014/09/hardware-assisted-virtualization/ |
With a scalable infrastructure, good hardware, SSD, practically XCache is not required. There is no XCache :
1 | http://www.webpagetest.org/result/140904_1J_10B/1/details/ |
We need X factors for a spinning hard disk, no CDN, no scalable InnoDB engine. Rest required is manual coding to decrease the number of requests, serving CSS without being a blocking element, setting the expire headers properly.