Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
XCache for vBulletin Caching Details »»
XCache for vBulletin Caching
Version: 0.9.1, by rossco_2005 rossco_2005 is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Category: Board Optimization - Version: 4.x.x Rating:
Released: 01-30-2012 Last Update: 05-25-2013 Installs: 35
Code Changes Additional Files Is in Beta Stage  
No support by the author.

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: https://vborg.vbsupport.ru/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:

PHP Code:
/*
 * XCache Config
 */
$config['xcache']['user'] = 'user';
$config['xcache']['pass'] = 'pass'
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:
PHP Code:
self::$instance vB_Cache_Db::instance(); 
Replace with:
PHP Code:
self::$instance fst_Cache_Xcache::instance(); 

Download Now

File Type: zip xcache-0.9.1.zip (3.7 KB, 150 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
4 благодарности(ей) от:
FReeSTER, Max Taxable, steviewonder44, tbworld

Comments
  #12  
Old 01-31-2012, 04:54 AM
thecore762 thecore762 is offline
 
Join Date: Jul 2008
Posts: 510
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What's the difference between this mod and vBOptimise?
Reply With Quote
  #13  
Old 01-31-2012, 09:38 AM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it seems you put lot of effort in this
but I do not know why but I am only convinced by server Header cache and mod expires instead
Reply With Quote
  #14  
Old 01-31-2012, 10:12 AM
Robru Robru is offline
 
Join Date: Aug 2005
Location: Netherlands
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for sharing this!
Reply With Quote
  #15  
Old 01-31-2012, 10:20 AM
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Posts: 1,158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you also need to ensure that your webhost supports xcache

mine does so for me this mod is useless, only install if your host supports it
Reply With Quote
  #16  
Old 01-31-2012, 10:51 AM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Who is using this and what are the results?

Any compatibility issues with mods or is this seamless?
Reply With Quote
  #17  
Old 01-31-2012, 11:12 AM
FReeSTER FReeSTER is offline
 
Join Date: Jun 2006
Location: Rome
Posts: 730
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #18  
Old 01-31-2012, 01:35 PM
Osbes Osbes is offline
 
Join Date: Jul 2008
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would also appreciate an APC version of this.
Reply With Quote
Благодарность от:
OldSchoolDSL
  #19  
Old 01-31-2012, 03:30 PM
dorans's Avatar
dorans dorans is offline
 
Join Date: Dec 2010
Location: Novi Sad, Srbija
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Osbes View Post
I would also appreciate an APC version of this.
+1 APC
Reply With Quote
Благодарность от:
OldSchoolDSL
  #20  
Old 01-31-2012, 06:21 PM
tarzan22 tarzan22 is offline
 
Join Date: Apr 2008
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

please, 4.1.10 ?
Reply With Quote
  #21  
Old 01-31-2012, 09:43 PM
CoZmicShReddeR's Avatar
CoZmicShReddeR CoZmicShReddeR is offline
 
Join Date: Sep 2006
Location: MI, USA
Posts: 338
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply


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

Forum Jump


All times are GMT. The time now is 06:25 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06332 seconds
  • Memory Usage 2,347KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (6)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete