vBulletin Datastore Cache – using Memcached cache to reduce MySQL database load

vBulletin versions 3.7.x and higher have feature to offload some frequently called database queries to a vBulletin Datastore Cache – which maybe via File cache, Xcache, APC Cache or Memcached server caching. My personal preference is using Xcache for vBulletin Datastore Cache for single server setups which are Apache web server based where both web and MySQL database tasks are run on the same server.

However, if you run multiple Apache based web servers in load balancer configuration or run Litespeed web server (in single or multiple server setups), you’ll need to change from using Xcache for vBulletin Datastore Cache and install, configure and use Memcached server for distributing vBulletin Datastore Cache across multiple Apache based web servers.

There are considerable savings in terms of offloading these frequently called database queries to vBulletin Datastore Cache and with additional enhanced performance via installing vB Optimise Pro plugin. For example from recent Litespeed web server based clients I did work for some stats below.

vB Client #1

Stats for 2x load balanced litespeed web servers (Single Intel Xeon W3550 3.06Ghz, 6GB memory, 15K SAS each) spawning 4x Memcached v1.4.5 servers for vBulletin datastore caching at off peak – low traffic times. In just over 6 1/4 hrs running, Memcached servers saved 5.5 million hits to the MySQL database server (dedicated Dual Intel Xeon E5520 2.27Ghz, 12GB memory, 1x 32GB Intel X25-E SSD, 1x 64GB Intel X25-E SSD, and 2x 15K SAS Raid 1).

4x Memcached 1.4.5 servers load balanced 2x Litespeed web servers

Peak time for 94 min run, saved 3+ million hits or ~532 cache hits/second saved ! Still MySQL server was handling ~300 queries/second even with Memcached servers reducing the database server end load.

This client just added vBulletin templates and stylesheet to Memcached server by installing vB Optimise Pro plugin and here’s first 24hrs of statistics. Spread over 4x Memcached cache servers, approximately 100.5 million cache hits which is approximately 1,162 cache hits/second with a 98.7% cache hit rate.

4x Memcached 1.4.5 server instances across load balanced Litespeed v4.0.20 web servers

Pages: 1 2 3 4


Previous:
Next:



MaxCDN Site Acceleration

Get Cost Effective Content Delivery
Unbeatable speed, stats, & price
http://www.maxcdn.com



7 Comments

  1. I too like using XCache, but I am worried by the fact that the last version came out after a full one year and that too was just a bug fix. Also the compatibility with php 5.3 seems a little iffy with the last attempted upgrade by my server admins to php 5.3, causing the xcache to stop working and hence necessitating a roll back to 5.2.x tree.

  2. Strange, for Apache web server based servers, I’ve been using PHP 5.3.x with Xcache v1.3.1 for months without problems for vB datastore cache on vB 3.8.x series. For PHP 5.2.x I used Xcache v1.2.x series though. Litespeed web servers though out of box don’t like Xcache/APC due to having PHP SuEXEC, so need to use Eaccelerator disk based cache for php opcode caching. This is all mainly on CentOS based linux platform. Not sure about other linux flavours.

  3. I too use CentOS + CPanel and irrespective of the host used (big managed ones mind you), none of the Apache + PHP + MYSQL upgrades go without the XCache acting up and throwing Segfaults. Will try and get the server updated to PHP 5.3 this weekend, any tips especially in respect of compatibility Zend etc. I need to watch out for?

  4. Are you compiling Apache/PHP 5.3.x via EasyApache with concurrent PHP4/PHP5 support and mod SuPHP ? For a while now, I have dumped WHM/Cpanel’s EasyApache default prompted option for concurrent PHP4/PHP5 patch and just select PHP5 with cgi unchecked (for DSO – dynamic Apache module) and uncheck mod SuPHP. Could be the difference ?

  5. I leave the upgrading of server software to the tech support of my host (same as yours) and I guess they do use EasyApache. Have always asked them to install it as DSO, as it is recommended by you.

  6. They probably just ran EasyApache with defaults which compiles concurrent PHP4/PHP5 with mod_suPHP. Maybe ask them to recompile without concurrent PHP4/PHP5 patch and with mod_suPHP and PHP5 cgi disabled.

  7. Did that and everything seems to be running smoothly for now with php 3.5.x + XCache. Thank you very much.

Trackbacks/Pingbacks

  1. vBulletin Datastore Memcached server cache corruption errors | vbtechsupport.com - [...] Could save yourself some headaches For real life example of Memcached server statistics read here.Related posts:vBulletin Datastore Cache –…
  2. Amazon ElastiCache - Memcached server cloud hosting for Amazon AWS | vbtechsupport.com - [...] very useful for vBulletin usage where off loading vBulletin datastore and other database queries to Memcached server dramatically reduce…
  3. Revisiting vBulletin Datastore Caching - memcached servers reducing MySQL server load | vbtechsupport.com - [...] eva2000 9 Nov, 2011 in forum software, memcached, mysql, vbulletin, web tech | 0 commentsBack in March, I illustrated…

Leave a Comment