Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
XCache for vBulletin Caching Details »
XCache for vBulletin Caching
Mod Version: 0.9.1, by rossco_2005 (Member) rossco_2005 is offline
Developer Last Online: May 2013 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (6 votes - 4.67 average) Installs: 34
Released: 30 Jan 2012 Last Update: 26 May 2013 Downloads: 272
Not Supported Code Changes Additional Files Is in Beta Stage  

This mod will replace the default vB_Cache_Db class (database cache) used in vBulletin with an xCache implementation of it.
vBulletin has promised to implement this option themselves, but I'm sick of waiting, so I created this.

What are the benefits of using XCache for caching over MySQL (Database) ?

In theory, quicker page load times, lower server load. This will offload the duty of caching from mysql and throw it into the RAM.
It will also reduce your query count per page.

The most staggering difference you will notice is with the CMS, or any mods that make good use of the cache.
For instance, in my dev site using the default CMS content and settings, browsing as a guest, I was able to shave off an average of 0.06 seconds from the page generation time (0.23 -> 0.17 seconds) and 43 queries (86 -> 43)!
In a live site, the reduction in queries and overall time spent serving the page will have a large effect on overall performance in a busy site.

Make sure that you also have the datastore cache method set to xcache as well for further query reduction: https://www.vbulletin.com/docs/html/datastore
Also install "Load templates from XCache" for further query reduction: http://www.vbulletin.org/forum/showthread.php?t=255994

Any drawbacks?

Other than a file edit required on every vBulletin upgrade, none that I can think of... If you think of one, post it.

What about other data caches ? (memcached, apc, etc.)

I could write those as well, if there is a demand for it, and they happen to work similar enough to xcache.

This is a beta!

This has been tested in a live forum for a few days, and no incidents/side-effects have been noticed or reported, but I cannot yet guarantee it is 100% perfect.

This mod requires one file edit

See this bug to find out why: http://tracker.vbulletin.com/browse/VBIV-13241

Requirements

This was designed to fail gracefully by falling back on the DB cache if there is an error, so if there is an error you will not even realize it.

Make sure these requirements are met:
  • XCache 1.3.2 installed (only version that I tested) (verify by viewing phpinfo page)
The following are in your XCache ini settings (php.ini usually):
  • xcache.var_size = 32M (32MB; at least)
  • xcache.var_slots = 8k (8000; at least)
  • Set xcache.admin.user and xcache.admin.pass to whatever you want (keep in mind that the pass must be MD5'd)

Restart after making any changes.

Another tip is to set your xcache.count and xcache.var_count to the number of CPU cores that you have.

See the documentation here: http://xcache.lighttpd.net/wiki/XcacheIni

After running this mod for a while, check your xcache admin page to ensure that your var_slots and var_size are large enough.

Install Instructions

1. Upload the contents of the UPLOAD folder in xcache.zip to your forum root

2. Open up your /includes/config.php file and add the following:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Edit it to include your xcache admin username and password

3. This step will need to be repeated whenever you do a forum upgrade.
Open up /vb/cache.php.
Find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Board Optimization datastore cache to XCache - boost your vBulletin phpxcache vBulletin 3.6 Add-ons 243 09 Jan 2010 20:36

  #16  
Old 31 Jan 2012, 11:12
FReeSTER FReeSTER is offline
 
Join Date: Jun 2006
well Im using it with vb4.1.7 and I guess I see some improvements on the site but not much. Maybe because my style is base on 90%images. but a bit of improvements here and there makes a change.

thanks
Reply With Quote
  #17  
Old 31 Jan 2012, 13:35
Osbes Osbes is offline
 
Join Date: Jul 2008
I would also appreciate an APC version of this.
Reply With Quote
  #18  
Old 31 Jan 2012, 15:30
dorans's Avatar
dorans dorans is offline
 
Join Date: Dec 2010
Real name: Zoran D.
Originally Posted by Osbes View Post
I would also appreciate an APC version of this.
+1 APC
Reply With Quote
  #19  
Old 31 Jan 2012, 18:21
tarzan22 tarzan22 is offline
 
Join Date: Apr 2008
please, 4.1.10 ?
__________________
Descarga directa
Reply With Quote
  #20  
Old 31 Jan 2012, 21:43
CoZmicShReddeR's Avatar
CoZmicShReddeR CoZmicShReddeR is offline
 
Join Date: Oct 2006
Real name: Martin Weltchek
I am using it with 4.1.10 no issues... I run my own dedicated Server Box 2 Quad Core Xeon with 28GB Ram running it with Windows 2008 64 bit server hosting with XAMPP/Apache Friends just downloaded a windows version of XCache works fine... It did speed the load times up about 5% on the CMS home front and about 3% for the forums... Not sure how to tweak it using default settings or suggested settings...
__________________
Reply With Quote
  #21  
Old 01 Feb 2012, 12:58
DNCL DNCL is offline
 
Join Date: Jul 2011
Do i have to enable XCache data store in config.php ?
Do i need to set the xcache admin pass in config.php?
What php handler i should use?

Last edited by DNCL; 01 Feb 2012 at 13:10.
Reply With Quote
  #22  
Old 01 Feb 2012, 13:49
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Originally Posted by DNCL View Post
Do i have to enable XCache data store in config.php ?
Do i need to set the xcache admin pass in config.php?
What php handler i should use?
you ned to make sure your your webhost allows it, or supports it
__________________
http://www.multihunters.co.uk - all your coding needs
Reply With Quote
  #23  
Old 01 Feb 2012, 15:29
DNCL DNCL is offline
 
Join Date: Jul 2011
Originally Posted by simonhind View Post
you ned to make sure your your webhost allows it, or supports it
I;ve missed some note the dev wrote, the xcache must be enabled in config.php but the other 2 questions still need answer about best php handler for xcache because i'm getting internal server error with some of them, i'm using suphp atm.

Last edited by DNCL; 01 Feb 2012 at 15:35.
Reply With Quote
  #24  
Old 01 Feb 2012, 16:25
michael24179 michael24179 is offline
 
Join Date: Nov 2007
CMS problem. Categories in the CMS can not be called.

An unexpected error has occurred. Please try again later.
If the problem persists, contact the technical administrator.





Cache system can unfortunately not be deleted
Reply With Quote
  #25  
Old 01 Feb 2012, 16:44
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Interesting.
I started looking at this in the summer but had to put it on hold.
Might have to play with this a bit.
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #26  
Old 01 Feb 2012, 22:23
rossco_2005's Avatar
rossco_2005 rossco_2005 is offline
 
Join Date: Apr 2005
Originally Posted by DNCL View Post
I;ve missed some note the dev wrote, the xcache must be enabled in config.php but the other 2 questions still need answer about best php handler for xcache because i'm getting internal server error with some of them, i'm using suphp atm.
The datastore cache does not have to be set to xcache. That was only a recommendation.
The xcache admin user and pass must be set in config.php. Read the install instructions to see the code necessary to add to config.php to do this.
As for your question about a php handler, my mod does not care which you use, but xcache might need a specific handler - I'm not sure. You will have to ask google or look on the xcache website about installing xcache.
__________________
Reply With Quote
  #27  
Old 01 Feb 2012, 22:25
rossco_2005's Avatar
rossco_2005 rossco_2005 is offline
 
Join Date: Apr 2005
Originally Posted by michael24179 View Post
CMS problem. Categories in the CMS can not be called.

An unexpected error has occurred. Please try again later.
If the problem persists, contact the technical administrator.





Cache system can unfortunately not be deleted
Do you have any mods installed? If so do you mind listing them?

Also what do you mean "cache system can unfortunately not be deleted."
__________________
Reply With Quote
  #28  
Old 01 Feb 2012, 22:33
rossco_2005's Avatar
rossco_2005 rossco_2005 is offline
 
Join Date: Apr 2005
Originally Posted by CoZmicShReddeR View Post
I am using it with 4.1.10 no issues... I run my own dedicated Server Box 2 Quad Core Xeon with 28GB Ram running it with Windows 2008 64 bit server hosting with XAMPP/Apache Friends just downloaded a windows version of XCache works fine... It did speed the load times up about 5% on the CMS home front and about 3% for the forums... Not sure how to tweak it using default settings or suggested settings...
Not sure which "default settings or suggested settings" your referring to, but here's basics of how to tweak xcache.
Actually there isn't really much to it.
Have a read here at what the different options affect:
http://xcache.lighttpd.net/wiki/XcacheIni

It would be useful for you to have xcache admin. It will tell you your cache sizes (php cache = xcache.size, var cache = xcache.var_size) in megabytes, and will tell you how many slots are available for each (php slots = xcache.slots, var slots = xcache.var_slots).
To see if you need to increase, or could get away with decreasing, those numbers, check how much memory is being used as well as how many slots are being used, then tweak accordingly.
If you are using all memory, you would increase memory.
If you are using all slots, increase the slots.
You want to leave extra room for the cache to grow, but keep in mind any memory you give to xcache takes away from memory available to the rest of the server, so it is up to you...
__________________
Reply With Quote
  #29  
Old 02 Feb 2012, 07:09
michael24179 michael24179 is offline
 
Join Date: Nov 2007
Cache system can unfortunately not be deleted


My Addons

404 Area 1.0
Admin Log In As User 3.21
Change Threads Prefix Inline 2.2.0
CT second_post_Ads 2.0.8
DownloadsII 6.0.9
Forum-wide Search For Unanswered Threads 4.2.0
Fussball Tippspiele 1.4.25 RC 1
MARCO1 Hide All 4.5
MGC chatbox Evo 3.0.0
Post Thank You Hack 7.82
Sids Hide Hack 0.9.8
Tabs en vBulletin 4.x 2.0.3
Template Modification System 1.2.0 Beta 4
Title Replace 1.1
vBulletin-CMS 4.1.10
vBulletin-CMS Links 1.0.0
VSa - Advanced Forum Rules 5.0.5
VSa - Sub-Forum Manager

My server
Operating System: Debian 6
Web Server lighttpd - cgi-fcgi
MySQL version 5.1.49-3
PHP 5.3.3-7 + squeeze6
Xcache Version 1.3.0
Attached Images
File Type: png cache.PNG (23.7 KB, 422 views)

Last edited by michael24179; 02 Feb 2012 at 15:57.
Reply With Quote
  #30  
Old 02 Feb 2012, 12:35
DNCL DNCL is offline
 
Join Date: Jul 2011
I'm asking about if i really need to set the xcache user/pass in config.php because i couldn't authenticate to xcache admin panel until i turned off the admin authentication.
Is it ok?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 12:09.

Layout Options | Width: Wide Color: