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

Reply
 
Thread Tools
datastore cache to XCache - boost your vBulletin Details »»
datastore cache to XCache - boost your vBulletin
Version: 0.8.5, by phpxcache phpxcache is offline
Developer Last Online: Mar 2008 Show Printable Version Email this Page

Category: Board Optimization - Version: 3.6.5 Rating:
Released: 03-02-2007 Last Update: 03-03-2007 Installs: 142
Code Changes Additional Files  
No support by the author.


(note: do not apply this patch on vBulletin 3.7 as it's included already)
This patch allow you to use XCache as a datastore cache in vBulletin. This is definitely your choice if you have installed and enabled XCache on you server already.

Take care that this is a beta version and was not heavily tested. And i'm not familiar with vBulletin source code as i just started reading it today, but i don't have any difficulty reading it thanks to my years of php skill

Take aware that some vB plugin is not compatible with vB_datastore_*, not just vB_datastore_XCache. So, in case you find vB_datastore_XCache won't work, you'd better try datastore to file or memcache. If one of the others works but not vB_datastore_XCache, do report it to me so i can fix it.

Pre-requirement
Install the modification
for those of you who can't run "patch", u may patch the file manually
  • download Attachment 61372 (class_datastore_xcache.php)
  • save the file as vBulletin.3.6/upload/includes/class_datastore_xcache.php
  • open vBulletin.3.6/upload/includes/class_datastore.php in your favor editor
  • add a line in class_datastore.php (see below)
  • update upload/includes/config.php to enable it (see below)

example class_datastore.php after modification:
PHP Code:
        }
        return 
true;
    }
}

// add class_datastore_xcache, enable it in config.php
require_once(DIR '/includes/class_datastore_xcache.php');

/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:33, Fri Mar 2nd 2007
|| # CVS: $RCSfile$ - $Revision: 15474 $
|| ####################################################################
\*======================================================================*/ 
example config.php after modification:
PHP Code:

    
// vB_Datastore_Filecache  - for using a cache file
// $config['Datastore']['class'] = 'vB_Datastore_Filecache';
$config['Datastore']['class'] = 'vB_Datastore_XCache';
    
// vB_Datastore_Memcached - for using a Memcache server
    // It is also necessary to specify the hostname or IP address and the port the server is listening on 
Trouble Shooting
q. i have multiple vBulletin instance installed, the seems to mix data after install this plugin
a. this applies to apc too because, if you wanna fix it, try
open class_core.php, look for:
$this->prefix =& $this->registry->config['Datastore']['prefix'];
and modify to:
$this->prefix = $this->registry->config['Datastore']['prefix'] . $_SERVER['SERVER_NAME']; // or HTTP_HOST

q. Warning: unserialize() expects parameter 1 to be string, array given in $a.php on line $b
a. upgrade your plugin/hack that $a.php belongs to, e.g. vbjournal/vbgallery etc. OR open $a.php and locate at line $b, remove unserialize call, e.g.:
replace $var = unserialize($this->data);
with $var = $this->data;
be careful do not remove the whole line, just the unseralize( and )

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #172  
Old 12-01-2007, 05:49 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hemanth View Post
Thanks.. But what are OOM's?
OOM= Out Of Memory.
if u run out of memory- while cacher requaired more memory- in the page u will see OOMs.
to solve it- u just have to increase allocated RAM. as it fit for ur need
Reply With Quote
  #173  
Old 12-01-2007, 12:43 PM
the Sandman's Avatar
the Sandman the Sandman is offline
 
Join Date: Aug 2003
Location: Tampa, FL
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zia View Post
regarding the misses & clogs- many times i have discussed with the author(phpxcache)
he always assured me..this is not a problem---this is purely okay.

mm do u mind to post ur var.cache list's screen shot -how come ur site got that much :erm: varbiable to be cached ,i know TAZ ..
either ur using temp.cache hack by lendy ?

---
and yes we are using vbseo3 gold + xcache+datastore (this hack) no problem at all
Yes, I'm running lendy's Template Cache. The var list is well over 300 entries long - too long to post.
Reply With Quote
  #174  
Old 12-01-2007, 08:36 PM
SemperFideles's Avatar
SemperFideles SemperFideles is offline
 
Join Date: Oct 2006
Location: Northern VA
Posts: 223
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zia View Post
OOM= Out Of Memory.
if u run out of memory- while cacher requaired more memory- in the page u will see OOMs.
to solve it- u just have to increase allocated RAM. as it fit for ur need
Right. Though you can also just increase the xcache.size and the xcache.var.size to fix the problem if you haven't maxed it out.

The default is set to xcache.size=32M and xcach.var.size=0M.

My board requires that my xcache.size=140M and my xcache.var.size=2M. I also have my count set to 2 for the number of processors.

As you can see, even though my xcache.size is 140MB and the xcache.var.size is 2MB (even though the variables get most of the hits), this is still way less than the 4GB of system RAM on my server. You do not necessarily need to upgrade your server to fix your OOM problem but simply change a couple of variables in your php.ini.
Reply With Quote
  #175  
Old 12-02-2007, 03:34 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by the Sandman View Post
Yes, I'm running lendy's Template Cache. The var list is well over 300 entries long - too long to post.

Thnax.
do u using the compress option too 0f lendy's temp.cache hack?
Reply With Quote
  #176  
Old 12-02-2007, 03:01 PM
the Sandman's Avatar
the Sandman the Sandman is offline
 
Join Date: Aug 2003
Location: Tampa, FL
Posts: 229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zia View Post
Thnax.
do u using the compress option too 0f lendy's temp.cache hack?
Yes. Is that advisable?
Reply With Quote
  #177  
Old 12-03-2007, 04:04 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by the Sandman View Post
Yes. Is that advisable?
sorry Sir....no idea.
we used lendy's one..but we didnt use compress option.
but at TAZ ur using compress & blieve theres no problem at all so its fine imho.
Reply With Quote
  #178  
Old 12-07-2007, 03:41 AM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This box is a dual xeon, 4gb memory server with a dozen domains only. What do you recommend for optimal performance and speed?

Also in the OP screenshot, where is this web result found? What path?

[xcache-common]

zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so

[xcache.admin]
xcache.admin.auth = On
xcache.admin.user = ""
xcache.admin.pass = ""

[xcache]
; ini only settings, all the values here is default unless explained

; select low level shm/allocator scheme implemenation
xcache.shm_scheme = "mmap"

; to disable: xcache.size=0
; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows
xcache.size = 0M

; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count = 1

; just a hash hints, you can always store count(items) > slots
xcache.slots = 8K

; ttl of the cache item, 0=forever
xcache.ttl = 0

; interval of gc scanning expired items, 0=no scan, other values is in seconds
xcache.gc_interval = 0

; same as aboves but for variable cache
xcache.var_size = 100M
xcache.var_count = 1
xcache.var_slots = 8K
; default ttl
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300

xcache.test = Off
; N/A for /dev/zero
xcache.readonly_protection = Off
; for *nix, xcache.mmap_path is a file path, not directory.
; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
; 2 group of php won't share the same /tmp/xcache
; for win32, xcache.mmap_path=anonymous map name, not file path
xcache.mmap_path = "/dev/zero"

; leave it blank(disabled) or "/tmp/phpcore/"
; make sure it's writable by php (without checking open_basedir)
xcache.coredump_directory = ""

; per request settings
xcache.cacher = On
xcache.stat = On
xcache.optimizer = On

[xcache.coverager]
; per request settings
; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing performance)
xcache.coverager = Off

; ini only settings
; make sure it's readable (care open_basedir) by coverage viewer script
; requires xcache.coverager=On
xcache.coveragedump_directory = ""

[eAccelerator]
extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

;[Zend]
;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0
;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0
;zend_optimizer.version=3.3.0

;extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/ffmpeg.so

[Zend]
;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0
;#zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0
;#zend_optimizer.version=3.3.0
;#zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
;#zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0
zend_optimizer.version=3.3.0
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
Reply With Quote
  #179  
Old 12-07-2007, 05:38 AM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is causing errors in vbjournal
https://vborg.vbsupport.ru/showthrea...96462&page=109

I get this when I go to "my journal" area

Warning: unserialize() expects parameter 1 to be string, array given in /journal.php on line 115

Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/includes/class_core.php:3118) in /includes/functions.php on line 2801


If I go to journal index I get this

Warning: unserialize() expects parameter 1 to be string, array given in /journal.php on line 115
Reply With Quote
  #180  
Old 12-08-2007, 04:29 AM
lazytown lazytown is offline
 
Join Date: Feb 2004
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by chadi View Post
This is causing errors in vbjournal
https://vborg.vbsupport.ru/showthrea...96462&page=109

I get this when I go to "my journal" area

Warning: unserialize() expects parameter 1 to be string, array given in /journal.php on line 115

Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/includes/class_core.php:3118) in /includes/functions.php on line 2801


If I go to journal index I get this

Warning: unserialize() expects parameter 1 to be string, array given in /journal.php on line 115
Yup, this doesn't work with VbJounal.. Also has problems (still) with vbgallery (or photopost vbgallery or whatever). I asked a few times what actions can be done code-wise to fix similar problem with mods, but I received no response. It's too bad because this does help a lot.

-vissa
Reply With Quote
  #181  
Old 12-08-2007, 04:54 PM
Yellow Slider Yellow Slider is offline
 
Join Date: Aug 2006
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm Using this hack for quite a long time now, and in the last few days the board seem to be slowing down with no reason, what do i Need to watch in the XCache fields? do i need to increase a var in the settings?
I'm using orban's temp' cach hack, i know that it's in the grave yard but its' working fine for me..

my board is running on C2D server with 2 GB ram.
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 12:37 AM.


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.04846 seconds
  • Memory Usage 2,338KB
  • 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
  • (2)bbcode_php
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete