PDA

View Full Version : Board Optimization - datastore cache to XCache - boost your vBulletin


phpxcache
03-02-2007, 10:00 PM
中文用户讨论@vbulletin-china.cn (http://forum.vbulletin-china.cn/showthread.php?p=5635)

(note: do not apply this patch on vBulletin 3.7 as it's included already)
This patch allow you to use XCache (http://xcache.lighttpd.net) 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

a working php installtion (http://www.php.net)
a working vBulletin 3.6.5 installtion (http://www.vbulletin.com)
a working XCache installtion (http://trac.lighttpd.net/xcache/wiki/InstallFromBinary)
set "xcache.var_size = 10M" or so in php ini


Install the modification
for those of you who can't run "patch", u may patch the file manually


download 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:

}
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:


// 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 )

Mudvayne
03-03-2007, 04:28 AM
w00t :D. I 'll try this as soon as I'm home :D. Clicked install :D.

Edit: Installed. 2 query reduced at forum home. Works like a charm. Screenshot added.

Zia
03-03-2007, 05:53 AM
Man..what u have done ?
Simply tremendous..........

Xcache rocks............

sure it will work better than others..
Xcache is working simply good......in my vb board...even it works better than eAcc.
it reduced my server load more....

can u say how much ram will be needed for using this? min.requirments?

Thanx......

Zia
03-03-2007, 06:28 AM
Hope to get it with in vb at next release...

i gez after install it we wont need memcache any more ????

bashy
03-03-2007, 06:47 AM
Sorry, all this talk is way over my head, can someone explain what this is about in laymans terms please?

Do i need to install this?

Zia
03-03-2007, 07:04 AM
helo bashy..

like; some of us using eAcc or APC or Xcache for php accleration.
If u have Xcache installed on ur box for php cache/optimize u can install it for datastore cache.

atm we are on Xcache and it really works nice than eAcc.And it reduce more serverload than eAcc.

Xcache is perfectly working with php5.2.* series.
http://trac.lighttpd.net/xcache/
Xcache have option to cache php & variable.....to enable datastore cache for vb+xcache.
Gonna install this patch for data-store cache.

bashy
03-03-2007, 07:12 AM
Ah right ok thanks Zia i understand now :)

Zia
03-03-2007, 07:18 AM
:) Just curious bashy...
which cacher/acclereator do u use?

jedisct1
03-03-2007, 07:50 AM
Reserved, thanks.

bluechris
03-03-2007, 11:12 AM
Sorry if i am sound stupid but i dont know how to apply the patch... i have xcache allready in the box with php 5.2 (2k3 box) and im little confused cause i never applied a patch in my vb.

Can someone explain?

lendy
03-03-2007, 11:31 AM
edit file includes/class_datastore.php
at th end (above ?>)
add nether php code


/**
* Class for fetching and initializing the vBulletin datastore from XCache
*
* @package vBulletin
* @version $Revision: $
* @date $Date: $
*/
class vB_Datastore_XCache extends vB_Datastore
{
/**
* Indicates if the result of a call to the register function should store the value in memory
*
* @var boolean
*/
var $store_result = false;

/**
* Fetches the contents of the datastore from XCache
*
* @param array Array of items to fetch from the datastore
*
* @return void
*/
function fetch($itemarray)
{
if (!function_exists('xcache_get'))
{
trigger_error('XCache not installed', E_USER_ERROR);
}

if (!ini_get('xcache.var_size'))
{
trigger_error('XCache variable data cache is not enabled, please set xcache.var_size in php.ini', E_USER_ERROR);
}

$db =& $this->dbobject;

$itemlist = array();

foreach ($this->defaultitems AS $item)
{
$this->do_fetch($item, $itemlist);
}

if (is_array($itemarray))
{
foreach ($itemarray AS $item)
{
$this->do_fetch($item, $itemlist);
}
}

$this->store_result = true;

// some of the items we are looking for were not found, lets get them in one go
if (!empty($itemlist))
{
$this->do_db_fetch(implode(',', $itemlist));
}

$this->check_options();

// set the version number variable
$this->registry->versionnumber =& $this->registry->options['templateversion'];
}

/**
* Fetches the data from shared memory and detects errors
*
* @param string title of the datastore item
* @param array A reference to an array of items that failed and need to fetched from the database
*
* @return boolean
*/
function do_fetch($title, &$itemlist)
{
$ptitle = $this->prefix . $title;

if (($data = xcache_get($ptitle)) === null)
{ // appears its not there, lets grab the data, and put it in
$itemlist[] = "'" . $this->dbobject->escape_string($title) . "'";
return false;
}
$this->register($title, $data);
return true;
}

/**
* Sorts the data returned from the cache and places it into appropriate places
*
* @param string The name of the data item to be processed
* @param mixed The data associated with the title
*
* @return void
*/
function register($title, $data)
{
if ($this->store_result === true)
{
$this->build($title, $data);
}
parent::register($title, $data);
}

/**
* Updates the appropriate cache file
*
* @param string title of the datastore item
* @param mixed The data associated with the title
*
* @return void
*/
function build($title, $data)
{
$ptitle = $this->prefix . $title;

xcache_unset($ptitle);
xcache_set($ptitle, $data);
}

}

// ################################################## ###########################


and edit includes/config.php
add or edit
$config['Datastore']['class'] = 'vB_Datastore_XCache';

precondition:
you must install xcache,and set xcache.var_size not 0,same as xcache.size in php.ini

Mudvayne
03-03-2007, 12:06 PM
Reserved
Why & what for? :S LOL

Deimos
03-03-2007, 12:45 PM
I assume we put the "vB_Datastore_XCache" File in the includes/datastore directory?

vBB-vietnam
03-03-2007, 01:28 PM
My server OS window 2003 . .Apache v2.0.59 , PHP 4.4.5
Can i use it .
sorry for my bad english

MikeWarner
03-03-2007, 01:39 PM
precondition:
you must install xcache,and set xcache.var_size not 0,same as xcache.size in php.iniEh? My var size is 0. You saying I have to set this to the same as what the xcache.size is? (100mb). Really? That much?

More info on this woul be good. I just tried to install this and got errors. I didn;t change the var size from 0, plus I assumed the location of the attached php file.

Please can more details be added to this hack as I would like to use it.

Thanks.

phpxcache
03-03-2007, 01:50 PM
i have updated the topic again.
setting "xcache.var_size not 0" is same as "xcache.size"
xcache.var_size = 10M or so is fine, just resize it for to fit your needs.

you gotta copy the content of the whole php file i attached into class_datastore.php, there's no new file is created or added

Zia
03-03-2007, 03:23 PM
My server OS window 2003 . .Apache v2.0.59 , PHP 4.4.5
Can i use it .
sorry for my bad english

I gez u can ..i gez
to use this(this thread) mods..u must have Xcache install in ur box
Download Win32AutoBuilds at here/XCache-VERSION-php-x.y.x-Win32-rREV.zip. This is an official SvnSnapShots autobuild, but NOT release version.
Check InstallingAsPhpExtension for instructions. (the doc is not updated for win32 yet)
It can be very hard to compile for Win32. If you're gonna do it yourself, Cygwin is required, and check the simple README to accomplish the complex job.

Disassembler is avaiable in source but missing one file due to license problem, so not built into win32 binary package. btw, disassembler isn't designed to work with commercal encoders/encrypters.

http://trac.lighttpd.net/xcache/wiki/Win32AutoBuilds

(The Author phpxcache can explain u better)
After u got xcache installed on ur Box..U can use this mods for datastore cache.

Zia
03-03-2007, 03:31 PM
Eh? My var size is 0. You saying I have to set this to the same as what the xcache.size is? (100mb). Really? That much?
More info on this woul be good. I just tried to install this and got errors. I didn;t change the var size from 0, plus I assumed the location of the attached php file.
Please can more details be added to this hack as I would like to use it.
Thanks.

Thanks for ur interest. I will try to provide u some info..see it it helps u a bit..

See bellow xcache.ini of our box

; select low level shm/allocator scheme implemenation
xcache.shm_scheme = "mmap"
xcache.size = 64M
xcache.count = 4
xcache.slots = 8K
xcache.ttl = 0
xcache.gc_interval = 0

; same as aboves but for variable cache
xcache.var_size = 64M
xcache.var_count = 4
xcache.var_slots = 8K
; default ttl
xcache.var_ttl = 0
xcache.var_maxttl = 0
;xcache.var garbage collect interval set to 6 hour.
xcache.var_gc_interval = 21600


Pls follow the red color text
xcache.size & xcache.var_size both set to 64Mb .
And ur using 100 Mb for xcache.size . :confused: did u really need that much memory ?:eek: we set 64MB.33Mb used and still 31MB is free out of 64Mb. when vbplaza on it just consume 3~4Mb more + few more php cached.

check ur xcache admin cp & if needed reduce allocated memory OR if u got enugh memory at ur box/server ..then u can use 100MB+100 Mb.

Point is that u have to put same MB of memory at xcache.size & xcache.var_size

php file in the attachmnet
you gotta copy the content of the whole php file i attached into class_datastore.php, there's no new file is created or added

MikeWarner
03-03-2007, 03:38 PM
No - I need 100mb. I have tried to reduce it, but was getting ooms using 90mb. I'll give it a try later. Thanks.

MikeWarner
03-03-2007, 03:54 PM
you gotta copy the content of the whole php file i attached into class_datastore.php, there's no new file is created or addedSo I need to replace the class_datastore.php file with the included file (renamed)?

Zia
03-03-2007, 03:56 PM
No - I need 100mb. I have tried to reduce it, but was getting ooms using 90mb. I'll give it a try later. Thanks.

ag OOMS ..thet u obiviously need 100 MB..(wondering how many things ur using)
then did u try 10 or 20 Mb for xcache.var_size ?

bluechris
03-03-2007, 06:50 PM
Thx guys for the reply... i got it working now.. is there anyway that i can see stats of the site how is it going... what is cached etc?

bluechris
03-03-2007, 07:33 PM
Nevermind i got the admin page working and i see the statistics... the point is i dont see cache working really... or i am mistaken.... see my php.ini settings

[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 32M
xcache.count = 2
xcache.slots = 8K
xcache.ttl = 0
xcache.gc_interval = 0

xcache.var_size = 32M
xcache.var_count = 2
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300

xcache.test = Off

xcache.readonly_protection = Off
xcache.mmap_path = "c:/temp"

xcache.coredump_directory = ""


xcache.cacher = On
xcache.stat = On
xcache.optimizer = On

[xcache.coverager]
xcache.coverager = Off
xcache.coveragedump_directory = ""


Also in admin page of xcache i see this results in the attached gif.

the only 4 hits that had cached is the pages from admin of xcache, do i need to do something extra in my VB? or anywhere else?

shifangjumie
03-03-2007, 11:01 PM
国内的兄弟??

Zia
03-04-2007, 01:50 AM
Nevermind i got the admin page working and i see the statistics... the point is i dont see cache working really... or i am mistaken.... see my php.ini settings

[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 32M
xcache.count = 2
xcache.slots = 8K
xcache.ttl = 0
xcache.gc_interval = 0

xcache.var_size = 32M
xcache.var_count = 2
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300

xcache.test = Off

xcache.readonly_protection = Off
xcache.mmap_path = "c:/temp"

xcache.coredump_directory = ""


xcache.cacher = On
xcache.stat = On
xcache.optimizer = On

[xcache.coverager]
xcache.coverager = Off
xcache.coveragedump_directory = ""


Also in admin page of xcache i see this results in the attached gif.

the only 4 hits that had cached is the pages from admin of xcache, do i need to do something extra in my VB? or anywhere else?

Ur on win server?
seemed that ur cache is working...

i m confused ur var.cache is working or not :confused: .....did u follow all the steps properly to enable var.cache?

phpxcache
03-04-2007, 01:57 AM
Nevermind i got the admin page working and i see the statistics... the point is i dont see cache working really... or i am mistaken.... see my php.ini settings
the only 4 hits that had cached is the pages from admin of xcache, do i need to do something extra in my VB? or anywhere else?

i assume you're usig windows, can u tell me how is your php installed? not the installtion steps, but about how it looks like. iis? apache? mod_fastcgi or not?


See Faq: Why is my cache being cleared? (http://trac.lighttpd.net/xcache/wiki/Faq#Iseejumpyhitsinadminpage)

bluechris
03-04-2007, 04:35 AM
I use IIS with php 5.2.1 ... but i got the big picture from the links and other search i did on web...
I think the problem is that i use fast-cgi..... this dont not work good in windows cause caching programs cannot share among many worker processes that windows run for each user ... my 2 options now is run as isapi i suppose or w8 for something else...... i dont know what else i can do.

Ur on win server?
seemed that ur cache is working...

i m confused ur var.cache is working or not :confused: .....did u follow all the steps properly to enable var.cache?

Yeap i got same statistics for var cache... says that hasn't cached anything.

MikeWarner
03-04-2007, 06:39 AM
Getting this error:
Fatal error: Cannot redeclare class vb_datastore:vb_datastore_xcache in /home/migweb/public_html/forums/includes/class_datastore_xcache.php on line 14

I double checked everything.

phpxcache
03-04-2007, 06:56 AM
Getting this error:
Fatal error: Cannot redeclare class vb_datastore:vb_datastore_xcache in /home/migweb/public_html/forums/includes/class_datastore_xcache.php on line 14

I double checked everything.
you gotta remove the old patch that you applied (inserted) to use the new installtion way.

search includes/* for string "vB_Datastore_XCache" (without the quotes)

MikeWarner
03-04-2007, 07:51 AM
Hmmm... now getting:
Fatal error: XCache variable data cache is not enabled, please set xcache.var_size in php.ini in /includes/class_datastore_xcache.php on line 39

xcahce.var_size is set to 10 and is showing in the xcache cp.

phpxcache
03-04-2007, 08:10 AM
as i said, set it to 10M or so, not 10

rjmjr69
03-04-2007, 08:18 AM
Looks nice I'll keep watch see if there are any bugs

MikeWarner
03-04-2007, 08:38 AM
Sorry, typo. I am running 10M.

Just spotted something. I'm using 3.6.4. Is that ok?

Thanks.

phpxcache
03-04-2007, 08:55 AM
the php cache part and the size of var cache looks good. but var cache is not caching anything in your case. did u request the vBulletin first to let it cache something in?

Zia
03-04-2007, 09:16 AM
Sorry, typo. I am running 10M.

Just spotted something. I'm using 3.6.4. Is that ok?

Thanks.

as per screenshot...u set xcache.count = 4 (ur processor count) & xcache.var_count = 1?

seemd ur var.cache isnt working.....
ask phpxcache .. diff. of xcache.count & xcache.var count will be a probs or not...

vb3.6.4 or 3.6.5 wont be a problem

viyanali
03-04-2007, 02:26 PM
thx *installed*
(works nice) :)

Zia
03-04-2007, 02:42 PM
viyanali yea..should be...one of the koolest thing..this is
even Xc consume less memory than eAcc or APC

bluechris
03-04-2007, 03:42 PM
phpxcache sorry m8 but i uninstalled it cause with it vbgooglemaphse & vbgooglemapme stopped working... they produced a white page without errors or anything..

I stay with xcache for template caching

IrPr
03-04-2007, 03:42 PM
I'm currently using APC on my major vB forum
do u suggest me to switch to XCache ?

Zia
03-04-2007, 04:27 PM
phpxcache sorry m8 but i uninstalled it cause with it vbgooglemaphse & vbgooglemapme stopped working... they produced a white page without errors or anything..
I stay with xcache for template caching

dont get ur word..that means after install this data store cache modification u faced mentioned error?
i would like to request u to provide as much as info possible for u to provide phpxcache for proper diagonisis & soltion...
or if u face error with Xcache drop ur issue http://trac.lighttpd.net/xcache/newticket .Soon..very soon u will get the reply..


I'm currently using APC on my major vB forum do u suggest me to switch to XCache ?

like wise i was on eAcc and then i moved to Xcache & suggest every one to switch to Xcache.
Do u know why? Coz,this is really too kool it works gr8 with less memory consumption even it makes my forum more faster than before.
and the main reason is that the author is very much agger to digg any bug & solve it ASAP.
wich i didnt get in eAcc or APC.

dicission is urs.

ubuntu-geek
03-04-2007, 04:45 PM
Installed, working great thanks.

bluechris
03-04-2007, 05:06 PM
I mean that if i enable vB_Datastore_XCache i get nothing from vbgooglemap. Xcache working fine as template cache atm.

ubuntu-geek
03-04-2007, 05:17 PM
I mean that if i enable vB_Datastore_XCache i get nothing from vbgooglemap. Xcache working fine as template cache atm.
Is it possible for you to turn on php errors? Then you can see the error. I know with xcache and php4 I had issues uploading attachments and some other various issues.

bluechris
03-04-2007, 06:17 PM
Im not with 4 i am with 5.2.1 ... i will turn on php errors to see whats going on.

bluechris
03-04-2007, 06:54 PM
I had errors in php.ini to all allready... just i get a blank page in googlemaps... strange though

goyo
03-04-2007, 09:38 PM
Compatibility problem.

Great hack unfortunately it's not compatible with Photopost vBGallery.

I'm receiving all kind of weird errors:


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

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /gallery/gallery_global.php on line 72

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

Warning: Invalid argument supplied for foreach() in /gallery/gallery_global.php on line 237


Also i'm receiving an error from Plugin Accelerator plugin:
Warning: unserialize() expects parameter 1 to be string, array given in /includes/class_plugin_accelerator.php on line 77


Phpxcache do you have any idea what could be the problem ?

Correction...it's not compatible with any of the large plugins like vBlogetin or GARS.
Errors like above everywhere :(

phpxcache
03-04-2007, 11:29 PM
I mean that if i enable vB_Datastore_XCache i get nothing from vbgooglemap. Xcache working fine as template cache atm.

does vb_Datastore_File works? (i can't recall the name, u may check the class name in class_datastore.php)

if yes, it's vB_Datastore_XCache problem, otherwise, it's the problem between vbgooglemap and vB_Datastore.

i'd like to know what's going on. hope i know how to install the plugin. i'll check it later, and/or you trace it down.

Gsmdenis
03-04-2007, 11:54 PM
support this for ever

BR.,

Denis

Zia
03-05-2007, 02:16 AM
Compatibility problem.
Great hack unfortunately it's not compatible with Photopost vBGallery.


Please report it

http://trac.lighttpd.net/xcache/newticket
here.u will need to reg.(5 sec need for reg.just ur nick & pass) and plese describe all the details..
ur php version /ur application :vb /extension -photopost vbgallery/gars ..(vblogetin is paid mods.If possible provide him more info) with the links.
n describe..
and be patient u will get ur solution soon....all user will be helped out

PhotoPlog: The Lite Gallery (https://vborg.vbsupport.ru/showthread.php?t=101368&highlight=Photopost+vBGallery) & GRPS: Groups Commune 2.0.x (https://vborg.vbsupport.ru/showthread.php?t=127303) & http://www.vblogetin.com/ ..
vblogetin is paid mods..so if ur willing to solve the issue u have to help him......depends on u

goyo
03-05-2007, 11:32 AM
Please report it

http://trac.lighttpd.net/xcache/newticket
here.u will need to reg.(5 sec need for reg.just ur nick & pass) and plese describe all the details..
ur php version /ur application :vb /extension -photopost vbgallery/gars ..(vblogetin is paid mods.If possible provide him more info) with the links.
n describe..
and be patient u will get ur solution soon....all user will be helped out

PhotoPlog: The Lite Gallery (https://vborg.vbsupport.ru/showthread.php?t=101368&highlight=Photopost+vBGallery) & GRPS: Groups Commune 2.0.x (https://vborg.vbsupport.ru/showthread.php?t=127303) & http://www.vblogetin.com/ ..
vblogetin is paid mods..so if ur willing to solve the issue u have to help him......depends on u

Thanks Zia,

It has nothing to do with xcache.
I'm running xcache since the 0.x releases (before anyone used as phpcache at vbulletin). Everything runs just fine.

This plugin only works well with stock vbulletin.

It doesn't work well with the plugins. (Not only vBGallery, Geek Article System, and vBlogetin...it doesn't work with vBShout...)

jason|xoxide
03-05-2007, 02:20 PM
Ah... Bummer... vbGallery stops working when this is activated (just as with the memcache datastore). I wish they'd get around to fixing their code...

Zia
03-05-2007, 02:27 PM
It doesn't work well with the plugins. (Not only vBGallery, Geek Article System, and vBlogetin...it doesn't work with vBShout...)

hmm ..do u mind to listing them from ur end...
coz this too kool modification needed to be perfect(as much possible)

1. vBGallery
2. Geek Article System
3. vBShout

plz continue

nix
03-05-2007, 06:30 PM
VBlogetin is working fine here.

phpxcache
03-05-2007, 10:52 PM
Ah... Bummer... vbGallery stops working when this is activated (just as with the memcache datastore). I wish they'd get around to fixing their code...

yup, i thought i can be vB_datastore_XCache plugin problem, but i copy the code from vB_datastore_APC, so it can also be problem of other plugin that isn't compatible with vB_datastore_*

thanks for your confirmation.

Zachariah
03-06-2007, 09:34 PM
I have not installed this but I have fixed PhotoPost vBgallery to work with Memcache.
- I think it will support other external cache programs also.

The problem was the way the original scripts are designed.

I do not have a full list but I am changing old calls to datastore items for vBgalery 2.2.

EX:

New:
$categorycache =& $vbulletin->gallery_c_cache;
$galleryoptions =& $vbulletin->adv_gallery_opt;
$gallery_permissions =& $vbulletin->gallery_ugroups;

vs. old way
$categorycache = unserialize($vbulletin->gallery_c_cache);
$galleryoptions = unserialize($vbulletin->adv_gallery_opt);
$gallery_permissions = unserialize($vbulletin->gallery_ugroups);

I have a windows system w/ memcache enabled and the gallery working with the new changes. With the current code in the gallery APC, Memcached setting stop the gallery from working.


I will also change the code to build datastore.

New:
build_datastore('name',serialize($field),1);

Old:
build_datastore('name',serialize($field));


Changes as these may also fix other scripts out there.

da420
03-06-2007, 09:55 PM
I applied the patch, and all I get is a blank page when accessing the forum.

Zia
03-09-2007, 08:55 AM
yet no errors...
its working...
confused why wont work for u :S

Mudvayne
03-09-2007, 09:24 AM
Works like a charm. I was supposed to install this 7 days ago. But I was having weird connection problem :(. Thanks a lot m0o :D. Screenshot added to 1st page (https://vborg.vbsupport.ru/showpost.php?p=1194614&postcount=2).

dbirosel
03-12-2007, 04:44 PM
So if you have a big board going on, it's recommended to run something like this? I have many plugins installed, what plugins will it intefere with?

phpxcache
03-13-2007, 12:11 AM
you'd better check if all your plugins works when vb_datastore is enabled (vb_datastore_xcache is only one of the datastores). may other vbulletin professional users give you advice

Zia
03-13-2007, 03:26 AM
So if you have a big board going on, it's recommended to run something like this? I have many plugins installed, what plugins will it intefere with?

yes..this mods is really very nice...makes our forum smoother....as i found it(xcache) reduced more server load than eAcc reduced...after impliment datastore...still i didnt face conflict at all.......
u can give a try

dbirosel
03-13-2007, 03:32 AM
yes..this mods is really very nice...makes our forum smoother....as i found it(xcache) reduced more server load than eAcc reduced...after impliment datastore...still i didnt face conflict at all.......
u can give a try
Thanks for the reply! Do you have any plugins on your board? How many? Just want to make sure it's safe to install with the other plugins i have.


i have vbshout, CMPS, and more..

Zia
03-13-2007, 03:52 AM
why not? yes there are......enough plugings installed with my board...

with xcache i didnt hesitate to install anything...

coz : the author of xcache & this hack..hes very much helpfull to solve users issue...
if u face any problem with xcache + this mods...u can just open a ticket HERE (http://trac.lighttpd.net/xcache/)

be sure that u will get solution..like me & few others...untill things within his reach u will get the solution......
as per the thread no one face probs with vbshout yet.
just GARS.
tho some said vblogetin doestwork ..other hand some have it working...

welll..go for it..any probs report to mOo.

kontrabass
03-15-2007, 02:35 PM
Sorry for my ignorance - but what is the advantage of using this hack, rather than just using vB_Datastore_Filecache and letting xcache cache the files?

pollon
03-15-2007, 09:04 PM
I'm ignorant too about this Mod.
- Does this mod reduce the server load so my forum is faster?
- Are there any positive consequences to use of bandwith?

Zia
03-16-2007, 04:30 AM
Sorry for my ignorance - but what is the advantage of using this hack, rather than just using vB_Datastore_Filecache and letting xcache cache the files?


helo kontrabass, xcache will cache ur php file by defult.but if u want to cache ur database ..u can use it.
Yes there are positive out put for that.

I'm ignorant too about this Mod.
- Does this mod reduce the server load so my forum is faster?
- Are there any positive consequences to use of bandwith?

Yes..Xcache reduce server load & makes froum faster & smoother....& while u use this mods.. it will make ur forum more faster..like:
after install mods...
2 query reduced at my forum home....
and i was really wonder it reduce +4 query at aracde pages
so other pages...as i think...forum is more faster now

NeutralizeR
03-16-2007, 08:15 AM
vBadvanced doesn't work. No modules are displayed.

Anybody has a fix for vBadvanced with XCache datastore cache enabled?

like this:
https://vborg.vbsupport.ru/showpost.php?p=1197515&postcount=55

Zia
03-16-2007, 03:58 PM
vBadvanced doesn't work. No modules are displayed.

Anybody has a fix for vBadvanced with XCache datastore cache enabled?

like this:
https://vborg.vbsupport.ru/showpost.php?p=1197515&postcount=55

hello...
please submit a ticket
http://trac.lighttpd.net/xcache/newticket

mOo is taking care of every single ticket related to vb...u will have reg. there (5 sec. register)

Please submit a ticket...with all the info...ur facing

Thanx.

magnus
03-16-2007, 04:07 PM
Nice. Shaved my FORUMHOME queries to 5. Definately makes a difference, good job!

da420
03-16-2007, 09:23 PM
Hey Zachariah,

Thanks for this, but where do I made these changes?



I have not installed this but I have fixed PhotoPost vBgallery to work with Memcache.
- I think it will support other external cache programs also.

The problem was the way the original scripts are designed.

I do not have a full list but I am changing old calls to datastore items for vBgalery 2.2.

EX:

New:
$categorycache =& $vbulletin->gallery_c_cache;
$galleryoptions =& $vbulletin->adv_gallery_opt;
$gallery_permissions =& $vbulletin->gallery_ugroups;vs. old way
$categorycache = unserialize($vbulletin->gallery_c_cache);
$galleryoptions = unserialize($vbulletin->adv_gallery_opt);
$gallery_permissions = unserialize($vbulletin->gallery_ugroups);I have a windows system w/ memcache enabled and the gallery working with the new changes. With the current code in the gallery APC, Memcached setting stop the gallery from working.


I will also change the code to build datastore.

New:
build_datastore('name',serialize($field),1);Old:
build_datastore('name',serialize($field));
Changes as these may also fix other scripts out there.

Freezerator
03-16-2007, 09:31 PM
Really nice mod. Has anyone tested this with vbSEO?

Also waiting till the vbadvanced bug is confirmed of fixed :)
Keep up the great works on this one!

nix
03-16-2007, 09:35 PM
Really nice mod. Has anyone tested this with vbSEO?

Also waiting till the vbadvanced bug is confirmed of fixed :)
Keep up the great works on this one!
I'm using it with vbSEO with no problems.

Zia
03-17-2007, 02:09 AM
Really nice mod. Has anyone tested this with vbSEO?

Also waiting till the vbadvanced bug is confirmed of fixed :)
Keep up the great works on this one!

www.golpo.net

vbseo 3 RC8 .Ioncube Version.

Working without any single issue.
but may be-...maybe...maybe...there will be conflict with Zend Version.

magnus
03-17-2007, 01:49 PM
www.golpo.net

vbseo 3 RC8 .Ioncube Version.

Working without any single issue.
but may be-...maybe...maybe...there will be conflict with Zend Version.


Yea, XCache will not work with Zend. They are mutually exclusive. I had to switch to ionCube.

Zia
03-17-2007, 03:10 PM
ya magnus,
Zend(zend ext. manager) wont work with Xcache.
from the begeining we are on ioncube n its wroking flawless :)

nix
03-17-2007, 05:43 PM
Also using Ioncube and have no issues with it so far.

vbSEO and vbadvanced both work.

Zia
03-18-2007, 06:19 AM
Also using Ioncube and have no issues with it so far.

vbSEO and vbadvanced both work.

very strange.....vbAdvance CMPS is working for u w/o any probs...

some is facing problem..then must be they ar3 doing something wrong...

Adrian Schneider
03-19-2007, 01:47 AM
vBlogetin doesn't use vBulletin's datastore functionality, which means this hack will not affect it.

Code Monkey
03-31-2007, 05:04 AM
This is great, thanks for your work on this. It's working great for me. Except it kills vBadvanced. So I put the following in config.php until I figure out why.


if(!defined('VBA_SCRIPT'))
{
$config['Datastore']['class'] = 'vB_Datastore_XCache';
}


I also found that if you are running more than one instance of vBulletin on the same server then you need to put the following above the declaration of the datastore class in config.php (above)


$config['Datastore']['prefix'] = 'prefixchoice';


Of course you need to choose a unique prefix for each site. The table prefix will do.

Code Monkey
03-31-2007, 05:31 PM
One thing I have noticed is that cron scripts that update the datastore for third party products don't update the copy in xcache.

Zia
04-02-2007, 04:11 AM
Helo code Mokey..

do u mind to report it at
http://trac.lighttpd.net/xcache/
with ur info..

Thanks

Code Monkey
04-04-2007, 03:16 AM
I had to turn this off. It doesn' seem to update the cache from the command line. Meaning, when a script that updates the datastore is run in a browser it works fine, when it's run as a server cron it does nothing. I'm not sure if it's a vBulletin issue or an xcache issue. I just have no time to look into it right now.

NeutralizeR
04-05-2007, 08:23 PM
I had to turn this off. It doesn' seem to update the cache from the command line. Meaning, when a script that updates the datastore is run in a browser it works fine, when it's run as a server cron it does nothing. I'm not sure if it's a vBulletin issue or an xcache issue. I just have no time to look into it right now.
Hi,

Thanks for the tip for:
if(!defined('VBA_SCRIPT'))
{
$config['Datastore']['class'] = 'vB_Datastore_XCache';
}I use this hack for the cron:
https://vborg.vbsupport.ru/showthread.php?t=123719

Maybe you should give a try because it doesn't seem i have any cron issues...

Code Monkey
04-06-2007, 03:39 AM
LOL, very cute showing me my own hack. However, I am refering to server cron. I have some very intensive scripts on certain sites that run every few minutes and need to be run using the command line.

Now that the xcache forums are back up I see it does not support cli yet. So I will wait. Meanwhile, it does a great job caching and optimizing the PHP scripts.

foulplay
04-06-2007, 09:48 AM
I just installed xcache and my boards are running smooth and fast.

I will install this hack once all the bugs have been fixed.

NeutralizeR
04-06-2007, 10:05 AM
LOL, very cute showing me my own hack. However, I am refering to server cron. I have some very intensive scripts on certain sites that run every few minutes and need to be run using the command line.

Now that the xcache forums are back up I see it does not support cli yet. So I will wait. Meanwhile, it does a great job caching and optimizing the PHP scripts.
I knew i'd seen your name before :P

I also have cronjobs set to run every few minutes (via cpanel - rsync between multiple servers)

They are fine for me.

Code Monkey
04-07-2007, 01:34 AM
I knew i'd seen your name before :P

I also have cronjobs set to run every few minutes (via cpanel - rsync between multiple servers)

They are fine for me.

That's very interesting since the xcache website says it does not support the command line interface at this time.

IsMaR
04-07-2007, 05:04 AM
how do install xcache in first place

NeutralizeR
04-07-2007, 05:14 AM
That's very interesting since the xcache website says it does not support the command line interface at this time.
Maybe we are still talking about the different things but whatever :) Peace...

TECK
04-22-2007, 04:11 PM
Personally, I would not go this way.
I prefer installing memcached (for datastore) then use XCache for the rest of the php files.
From my tests, this combination improves the VB performance by over 250%. Expecially if you use 2 servers or more for your site.

An example: With the above setup, the forumhome memory usage drops from 3,500KB to 720KB.
The rest is cached by the memcached/XCache combo.

Still, that does not say your code is bad. Congrats on a good idea. :)

Masala4india
04-22-2007, 04:45 PM
i m also getting this error
Fatal error: Class vb_datastore_xcache: Cannot inherit from undefined class vb_datastore in /home/forum/public_html/includes/class_datastore_xcache.php on line 14

i checked the answer of phpxcache regarding this error but unable to do. Please guide me.

foulplay
04-22-2007, 05:49 PM
Anybody get this mod working okay? Sounds like a brilliant idea!

Zia
04-24-2007, 07:31 AM
its working on our site without any single issue...

b4 using it..u must have xcache installed

Atakan KOC
06-05-2007, 06:41 AM
Fatal error: XCache variable data cache is not enabled, please set xcache.var_size in php.ini in /includes/class_datastore_xcache.php on line 39

Snider
06-05-2007, 10:58 AM
Fatal error: XCache variable data cache is not enabled, please set xcache.var_size in php.ini in /includes/class_datastore_xcache.php on line 39

Read the post !!

gabrielt
06-18-2007, 11:23 PM
I prefer installing memcached (for datastore) then use XCache for the rest of the php files. From my tests, this combination improves the VB performance by over 250%. Expecially if you use 2 servers or more for your site.

I am running memcached here. Can I use both or they are mutual exclusive? Anyone made performance tests comparing the two?

Thanks
Gabriel.

eva2000
06-19-2007, 07:29 AM
haven't used memcached but just installed xcache/datastore hack on one of my forums.. made a tremendous difference to the speed :D

excellent stuff !

anyone have any ideas how this would work with load balanced multi web server setup ? guess memcached would work better for load balanced servers ?

gabrielt
06-19-2007, 08:18 PM
anyone have any ideas how this would work with load balanced multi web server setup ? guess memcached would work better for load balanced servers ?

I use memcached on my setup, I have two webservers and I installed memcached on my MySQL server, so the memcached on MySQL server caches for both webservers.

Gabriel.

phpxcache
06-21-2007, 01:34 AM
I am running memcached here. Can I use both or they are mutual exclusive? Anyone made performance tests comparing the two?

Thanks
Gabriel.

you can use XCache as opcode cacher, while using xcache OR memcached as vBulletin datastore cache.

Yellow Slider
06-30-2007, 02:24 PM
you can use XCache as opcode cacher, while using xcache OR memcached as vBulletin datastore cache.

Can you explain how?, I'll installed the Xcache hack, and It will Cache the php files?, can someone explain what do you mean by "datastore"?

how can I work with memcache and Xcache to get the most out of the two of them?
memcache will cache the DB ( how exactly ? ) there is another hack?
and the Xcache will cache the php time? and the php process time will be faster?

phpxcache
07-01-2007, 12:08 AM
Can you explain how?, I'll installed the Xcache hack, and It will Cache the php files?, can someone explain what do you mean by "datastore"?

how can I work with memcache and Xcache to get the most out of the two of them?
memcache will cache the DB ( how exactly ? ) there is another hack?
and the Xcache will cache the php time? and the php process time will be faster?
u need no hack but just install XCache extension to cache php.

this hack/addon just allow you cache datastore to XCache beside memcached/file/apc/...
so if you wanna use memcache for DB/datastore, just install XCache extension but not this hack.

the meaning of "datastore" is defined by vbulletin, not me. it's simply a DB cache, nothing more, nothing less.

Yellow Slider
07-01-2007, 12:15 PM
u need no hack but just install XCache extension to cache php.

this hack/addon just allow you cache datastore to XCache beside memcached/file/apc/...
so if you wanna use memcache for DB/datastore, just install XCache extension but not this hack.

the meaning of "datastore" is defined by vbulletin, not me. it's simply a DB cache, nothing more, nothing less.

Can i use this modification (off course with Xcache installed ) and to work with Memcache at the same time?
beside of that, What do you think will do the work better Xcache with this hack or Memcache?
Are they doing the same things?

There is DC caching and PHP caching, What do I use Memcache for?

phpxcache
07-01-2007, 12:39 PM
XCache datastore is same as file/apc/memcached data sore, u just pick one of them.
1. use XCache for php caching, and/or:
2. use of and ONLY one of "ea/file/apc/memcached/XCache" for datastore caching,
u can't do Xcache_datastore + memcached_datastore or anther combination, but you can
xcache_php_caching + xcache_datastore
or xcache_php_caching + memcached_datastore
or xcache_php_caching + file_datastore etc

"ea/file/apc/memcached" is officially supported by vBulletin, this hack only add and XCache optional choice for you.

rootnik
07-01-2007, 06:27 PM
What is the lowest I should set my var.cache size?

Would it be foolish to set it to something as low a 4M? I ask because after running it for about an hour I only used around 2mb of the cache and it was showing no signs of maxing out.

Paul M
07-01-2007, 06:37 PM
4M is plenty if you are only using it for vbulletin (I only have mine set to 2M).

Yellow Slider
07-02-2007, 01:54 PM
XCache datastore is same as file/apc/memcached data sore, u just pick one of them.
1. use XCache for php caching, and/or:
2. use of and ONLY one of "ea/file/apc/memcached/XCache" for datastore caching,
u can't do Xcache_datastore + memcached_datastore or anther combination, but you can
xcache_php_caching + xcache_datastore
or xcache_php_caching + memcached_datastore
or xcache_php_caching + file_datastore etc

"ea/file/apc/memcached" is officially supported by vBulletin, this hack only add and XCache optional choice for you.
And this modification is caching php or datastore?
Are you planning to release a modification that will work with Xcache / memcache and will cache php too?

Thanks a lot.

TECK
07-02-2007, 06:51 PM
I am running memcached here. Can I use both or they are mutual exclusive? Anyone made performance tests comparing the two?

Thanks
Gabriel.
If you want real performance, yes use both of them, but do not enable xcache in config.php file.
More exacly, use memcached for datastore and XCache for the php files.
I built my own rpms, optimized for lighty and vbulletin. Please dont ask me anything if you use Crapache. :)

Yellow Slider
07-03-2007, 02:40 PM
I have installed this modification, and nothing is changed..
how can I Be 100% that this modification is doing some thing? :\
Maybe I havn't installed it property , but there isn't anything to do, upload a file and to add a line in the config file..

what may be wrong?

config file -
// Here you can configure different methods for caching datastore items.
// 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
//$config['Datastore']['class'] = 'vB_Datastore_Memcached';
//$i = 0;
// First Server
$i++;
$config['Misc']['memcacheserver'][$i] = '127.0.0.3';
$config['Misc']['memcacheport'][$i] = 11211;
$config['Misc']['memcachepersistent'][$i] = true;
$config['Misc']['memcacheweight'][$i] = 1;
$config['Misc']['memcachetimeout'][$i] = 1;
$config['Misc']['memcacheretry_interval'][$i] = 15;

class_datastore -

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

/*================================================= =====================*\
|| ################################################## ##################

I've uploaded the class_datastore_xcache.php to /includes/class_datastore_xcache.php

rootnik
07-04-2007, 01:11 AM
I have installed this modification, and nothing is changed..
how can I Be 100% that this modification is doing some thing? :\
Maybe I havn't installed it property , but there isn't anything to do, upload a file and to add a line in the config file..

what may be wrong?

config file -
// Here you can configure different methods for caching datastore items.
// 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
//$config['Datastore']['class'] = 'vB_Datastore_Memcached';
//$i = 0;
// First Server
$i++;
$config['Misc']['memcacheserver'][$i] = '127.0.0.3';
$config['Misc']['memcacheport'][$i] = 11211;
$config['Misc']['memcachepersistent'][$i] = true;
$config['Misc']['memcacheweight'][$i] = 1;
$config['Misc']['memcachetimeout'][$i] = 1;
$config['Misc']['memcacheretry_interval'][$i] = 15;

class_datastore -

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

/*================================================= =====================*\
|| ################################################## ##################

I've uploaded the class_datastore_xcache.php to /includes/class_datastore_xcache.php

I'm pretty sure you will want to comment out the $config['Misc']['memcache* lines if you want to switch to xcache.

Yellow Slider
07-04-2007, 08:29 AM
I've done it after posting here, and still there in no change..
how can i check and see if the modification actually works?

View the Attachments file maybe it will give you some clue, I've installed the cache templates modification as well..

Yellow Slider
07-06-2007, 11:19 AM
Can't anyone help me ? :\

Zia
07-11-2007, 08:14 AM
yellow spider..
as ur attachment.its saying var.cache is working

Itworx4me
07-13-2007, 01:48 PM
Will this modification work if you have xcache running as a rpm?

Thanks,
Itworx4me

phpxcache
07-14-2007, 12:43 AM
Will this modification work if you have xcache running as a rpm?

Thanks,
Itworx4me

sure, rpm won't run for you, but it will install xcache, and you run php+xcache. that's it. it doesn't matter if you install it with rpm or whatever

Itworx4me
07-18-2007, 01:41 AM
I get this error when trying to install this mod:

Fatal error: XCache not installed in /includes/class_datastore_xcache.php on line 34

Any idea?

Thanks,
Itworx4me

phpxcache
07-18-2007, 05:15 AM
u have to get your XCache run first.

i suppose u have installed a XCache with rpm, but u shall append php.ini with xcache.ini and update some values.

see http://xcache.lighttpd.net/wiki/InstallingAsPhpExtension

foulplay
07-29-2007, 02:59 AM
Wow I finally figured it out and installed this hack myself. No errors as my site is Super Fast!! I'm using vbulletin 3.6.8

Zia
07-29-2007, 07:56 AM
congrats........it really works

Brandon Sheley
08-03-2007, 05:35 AM
I asked my host about xcache and this was their reply

As for installing it, I don't really recommend it. I've found it to be somewhat
buggy, and doesn't work well with ionCube, or Zend Optimizer.

as I'm running Zend, I don't want to install xcache if it's going to crash the site.
any comment is greatly appreciated.

Thanks

da420
08-03-2007, 04:43 PM
I asked my host about xcache and this was their reply



as I'm running Zend, I don't want to install xcache if it's going to crash the site.
any comment is greatly appreciated.

Thanks

This is true with the previous versions of XCache, but not the current versions (to my knowledge).

Zia
08-05-2007, 08:13 AM
afaik - xcache current version do not have any conflict with zend.

but why u need zend optimizer ? vbseo ?

st1905
08-07-2007, 05:48 PM
Installed and working great, thank you.

Paul M
09-03-2007, 11:46 PM
as I'm running Zend, I don't want to install xcache if it's going to crash the site.
any comment is greatly appreciated.

That's old news, the current version (1.2.1) works with zend.

We've been running xcache for a few months now without any issues.

Hoffi
09-07-2007, 10:12 PM
Just installed. After some trouble with ZEND now all works fine.

Mecho
09-08-2007, 01:42 PM
hi ,
i have a VPS account , xcache (1.2.1) Installed . do u suggest me to install this one too ??? (i'm newbie in these stuff)

thanks

BBF
09-15-2007, 02:22 PM
works with 3.6.8?

phpxcache
09-16-2007, 01:23 AM
yep, i just installed it for someone

Zia
09-16-2007, 05:58 AM
hi ,
i have a VPS account , xcache (1.2.1) Installed . do u suggest me to install this one too ??? (i'm newbie in these stuff)

thanks

:) this mod really helping out...
u can install this mod...with u vb

Mecho
09-16-2007, 04:47 PM
OK Thank u for reply .. i'm going to try .

just would u plz tell me after install this i have to do something ? like run something or cleaning or ..............


thank u


EDIT > installed . i changed xcache size in php.ini ( /usr/local/lib/php.ini ) , Restarted Server and then i got this error in site :
Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 85 and 124

any idea plz ?

Zia
09-20-2007, 07:29 AM
EDIT > installed . i changed xcache size in php.ini ( /usr/local/lib/php.ini ) , Restarted Server and then i got this error in site :
any idea plz ?

u need to change xcache.var.size to 4 (4MB) or whatever ur ram supported...
then restart ur server..

Mecho
09-20-2007, 01:07 PM
still this error :

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 124

Unable to add cookies, header already sent.
File: /public_html/forum/includes/class_core.php
Line: 3116

any idea ?

here is my setting about Xcache in php.ini :

; same as aboves but for variable cache
xcache.var_size = 4M
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 = "/tmp/phpcore/"

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

[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 = ""

phpxcache
09-21-2007, 06:05 AM
still this error :
any idea ?
here is my setting about Xcache in php.ini :

try phpinfo() ?

Mecho
09-21-2007, 09:10 AM
sorry but i dont get what u meant !

phpxcache
09-22-2007, 07:36 AM
sorry but i dont get what u meant !

why not try phpinfo() and show us what's there, just like you check your ini settings
to setup a phpinfo, see www.php.net/phpinfo example

Mecho
09-22-2007, 02:26 PM
ah ok . got it >

phpinfo.php (http://mechodownload.com/phpinfo.php)

phpxcache
09-23-2007, 12:44 AM
how do you load xcache.so?
extension=xcache.so
OR
zend_extension=/path/to/xcache.so

try the other way

Hemanth
09-23-2007, 03:09 PM
Installed and working smootly.. How can I check any performance improvements? :)

Btw. On first install it damaged the Zend installation.. After some investigation I simply reinstalled Zend and everything is smooth now.

Mecho
09-23-2007, 07:36 PM
how do you load xcache.so?
extension=xcache.so
OR
zend_extension=/path/to/xcache.so

try the other way

it was Zend_extension ( correct path ) , i remarked it with ;; and them removed ;; from extension=xcache.so . server restarted . this errors showed up :
Fatal error: XCache not installed in /includes/class_datastore_xcache.php on line 34

sry for this problem . i'm noob in these stuff .

Zia
10-06-2007, 07:36 AM
Helo phpxcache..
can u say is there any way to use this varcache with particular Vb Module like Vbradio & Tv (https://vborg.vbsupport.ru/showthread.php?t=152037&page=44)?

lazytown
10-08-2007, 07:59 AM
Tried this out... Seemed to work great except some strange problems with vbjournal and photopost gallery (2.3 -- still problems with xcache datastore).

I had to disable it due to the plugin problems. If there was a guide on how to change plugins so they are compatible that might be helpful.

rwilkins108
10-09-2007, 06:37 PM
Hmm, I got xCache 1.2.1 working, but for some reason the Clogs keep on going up and up, much faster than anything else, plus it is always compiling... Searching on line other people have had the same problem, but doesn't look like there is a solution. My setup win2003 - Apache v2.2.3 - php5.2.4



Slots Size Avail % Compiling Hits Misses Clogs OOMs Protected Cached Deleted GC
php#0 8.00 K 64.00 M 62.06 M yes 0 10 5,111 0 no 9 0 [xcache]
xcache.shm_scheme = "mmap"
xcache.size = 64M
xcache.count = 1
xcache.slots = 8k
xcache.ttl = 0
xcache.gc_interval = 0

; same as aboves but for variable cache
xcache.var_size = 64M
xcache.var_count = 1
xcache.var_slots = 8K

xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300

xcache.test = Off
xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"

hilfe-forum
10-12-2007, 01:59 AM
Love it...
Board index Loading Time goes to 15 sec (before 22 sec)
THX for this hack!

lazytown
10-12-2007, 06:21 AM
Is there any way to disable this for certain mods or modify them to work with the xcache datastore?

If the datastore won't work, is there still some benefit to the filestore? I noticed that works with all my mods and Xcache actually caches it as a php file.

-vissa

lazytown
10-12-2007, 06:22 AM
Love it...
Board index Loading Time goes to 15 sec (before 22 sec)
THX for this hack!

Wow, but that's still a horrendously long load time!

hilfe-forum
10-12-2007, 01:22 PM
Wow, but that's still a horrendously long load time!

Not realy
Its only a dual Xenon with 2 Gig RAM an 3 Medium Boards:

http://forum.hilfe-forum.eu/
http://www.hilfe-forum.eu/hilfe-forum/
http://musik.hilfe-forum.eu/

the biggest Board ( http://www.hilfe-forum.eu/hilfe-forum/ ) have a Million Post and ca. 80 Hacks...

So 15 sec loading Time is very god ;)

now i optimize the xcache seting now loading Time is 10 sec. ;)

Paul M
10-12-2007, 04:29 PM
15 seconds is not very good, it's poor.

vb.org has over a million posts, so does Cable Forum - it either of them took that long to load up i'd be worried.

hilfe-forum
10-12-2007, 04:38 PM
15 seconds is not very good, it's poor.

vb.org has over a million posts, so does Cable Forum - it either of them took that long to load up i'd be worried.

But vb.org is 1 Board.
I have 3 Boards on 1 Dual Xenon with 2 Gig RAM
1. Board 900.000 Post 20 Hacks 600 Sub-Foren
2. Board 950.000 Post 80 Hacks 600-Sub Foren
3. Board 200.000 Post 1200 Sub-Foren (near 50.000 Post per Day per RSS Feed)

Thats not the same like vb.org
So i think for this is 15 sec. is very very good ;)

(sorry for my bad english)

But back to Topik...

lazytown
10-13-2007, 04:50 AM
Are you talking 15 seconds as reported by vbMicroStats or some other method? I have 3 large VB forums (almost 3mil posts together) on 1 dual xeon and have load times of less than a second on the forum home. Plus the server runs about 10 other busy sites, an online learning center, some old UBB forums, etc.. Of course I do have 4GB and scsi raid 5. Still, your server/vb must not be optimized.

-vissa

hilfe-forum
10-13-2007, 08:36 AM
vbMicroStats reported 1-8 sec...
But real loading Time (DSL 12000) = ~10 sec.
My Server has only one IDE HDD
Most Time need the Hacks and RSS-Feeds
Showtread have 132 queries...
Page generated in 1,25929 seconds with 132 queries [Server Loads: 3.20 2.87 : 3.52]

Can any mod Post 145-149 move to here:
https://vborg.vbsupport.ru/forumdisplay.php?f=197
THX

Deriel
10-13-2007, 12:33 PM
132 queries? :eek: Way too much :confused: Showthread is 12 queries in my board

Anyway, this is a really good MOD =] Thanks and congratulations!

lauxanh
10-14-2007, 10:12 PM
Can you give me alittle guide. I did the same thing as instruction but get error:

XCache variable data cache is not enabled, please set xcache.var_size in php.ini.....

my xcache.ini
[xcache-common]
zend_extension = /usr/lib/20020429/xcache.so

; required for >=php5.1 if you turn XCache on
auto_globals_jit = Off

[xcache.admin]
xcache.admin.user = "admin"
; paste the output of md5("password") below
xcache.admin.pass = ""

[xcache]
xcache.size = 32M
xcache.count = 2
xcache.slots = 8K


xcache.var_size = 32M
xcache.var_count = 2
xcache.var_slots = 8K

xcache.mmap_path = "/dev/zero"
xcache.cacher = On

CBrown
10-14-2007, 11:20 PM
xcache.ini ??

If it is installed correctly, those fields should be found in your php.ini file. /etc/php.ini

Hence, what the error message is telling you to look into.

Not sure what else is going on with your setup unless you can give some more information. I've got xcache and this mod running on two dedicated servers now.

lauxanh
10-15-2007, 07:53 PM
well, some how for my setup php4.4.7 when i include
those config to the php.ini it does not work. httpd wont start. The i make an xcache.ini in the extension_dir with all the config info. Xcache works.

But it does not work with Var-cache

Zia
10-18-2007, 02:21 AM
lauxanh ..
there s/b something wrong at ur installation..

lauxanh
10-26-2007, 01:51 AM
I have no i dea why.

I tried to move those config to php.ini but when ever i put it in then add:
$config['Datastore']['class'] = 'vB_Datastore_XCache';
to config.php
restart webserver.

I see blank page

see attachment

Zia
10-28-2007, 07:00 AM
never had any problem around it..using it from the day it released....

booktoweb
11-10-2007, 02:19 AM
i have this issue

Fatal error: Class vb_datastore_xcache: Cannot inherit from undefined class vb_datastore in /home/****/public_html/includes/class_datastore_xcache.php on line 14

wdwms
11-27-2007, 10:38 PM
Does this mod work when you have more than one VB installation on a server? I've got two installs but the variables are clashing with each other if i enable the mod on both vb installs at the same time.. :(

Paul M
11-28-2007, 12:05 AM
Yep, I think that two installations may possibly clash.

phpxcache
11-28-2007, 01:40 AM
Does this mod work when you have more than one VB installation on a server? I've got two installs but the variables are clashing with each other if i enable the mod on both vb installs at the same time.. :(

this applies to apc too, 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

rwilkins108
11-28-2007, 11:39 AM
I've searched this mod for vbseo as in 3.1 it now supports xcache, but the only references I found were that vbseo works, but no information about the new version. Anyone know if there's any conflict between this mod and vbseo's xcache support?

Thanks,
Ron

Paul M
11-28-2007, 01:03 PM
I'm running vbseo 3.1, with xcache and this mod.

wdwms
11-28-2007, 02:14 PM
this applies to apc too, 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

Ok yah i could try that... thats a good idea.. I did setup memcached for my other forum as a test..

I'm running vbseo 3.1, with xcache and this mod.

ditto that, same here.. two boards and no issue.. although my xcache deleted count never goes up.. odd..

wdwms
11-28-2007, 02:19 PM
this applies to apc too, 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

Just tried this, it works great! thanks! now i'll killl mcached..

SemperFideles
11-30-2007, 10:37 AM
I had to uninstall this hack as it caused issues with products as I was installing them. I actually think it is more of an Xcache issue:

http://www.vbulletin.com/forum/showthread.php?p=1311520#post1311520

SemperFideles
11-30-2007, 10:40 AM
I've searched this mod for vbseo as in 3.1 it now supports xcache, but the only references I found were that vbseo works, but no information about the new version. Anyone know if there's any conflict between this mod and vbseo's xcache support?

Thanks,
Ron

I'm running vbseo 3.1, with xcache and this mod.

I was running this mod and had xCache support turned on for vBSEO 3.1.0 but ran into the problem of the preceding post. Disabling this hack solved the problem while I've been able to leave Xcache on for vBSEO. I may try APC though based on that thread that I just referenced.

the Sandman
11-30-2007, 10:07 PM
I'm running this mod as well as the Template Cache mod on a dual core dual Opteron 265 with 4 GB RAM. XCache has been running on the most recent settings for 12 hours or so:

https://vborg.vbsupport.ru/

Why do you suppose there are so many misses (and so many hits) in the var#3 cache?

SemperFideles
11-30-2007, 11:15 PM
Sandman,

Misses, hits, and clogs are OK. What you need to watch out for are OOM's. I've found my server will actually crash if I don't watch that. If that happens then bump up your xcache.size and/or xcache.var.size until you hit the sweet spot.

Zia
12-01-2007, 05:39 AM
I'm running this mod as well as the Template Cache mod on a dual core dual Opteron 265 with 4 GB RAM. XCache has been running on the most recent settings for 12 hours or so:

http://www.theadminzone.com/forums/images/XCache1.jpg

Why do you suppose there are so many misses (and so many hits) in the var#3 cache?

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 :eek::erm: varbiable to be cached :eek::rolleyes: ,i know TAZ ..
either ur using temp.cache hack by lendy (https://vborg.vbsupport.ru/showthread.php?t=139151&highlight=xcache) ?

---
and yes we are using vbseo3 gold + xcache+datastore (this hack) no problem at all

Hemanth
12-01-2007, 05:42 AM
Misses, hits, and clogs are OK. What you need to watch out for are OOM's.

Thanks.. But what are OOM's?

Zia
12-01-2007, 05:49 AM
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

the Sandman
12-01-2007, 12:43 PM
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 :eek::erm: varbiable to be cached :eek::rolleyes: ,i know TAZ ..
either ur using temp.cache hack by lendy (https://vborg.vbsupport.ru/showthread.php?t=139151&highlight=xcache) ?

---
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.

SemperFideles
12-01-2007, 08:36 PM
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.

Zia
12-02-2007, 03:34 AM
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?

the Sandman
12-02-2007, 03:01 PM
Thnax.
do u using the compress option too 0f lendy's temp.cache hack?Yes. Is that advisable?

Zia
12-03-2007, 04:04 AM
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.

Chadi
12-07-2007, 03:41 AM
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

Chadi
12-07-2007, 05:38 AM
This is causing errors in vbjournal
https://vborg.vbsupport.ru/showthread.php?t=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

lazytown
12-08-2007, 04:29 AM
This is causing errors in vbjournal
https://vborg.vbsupport.ru/showthread.php?t=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

Yellow Slider
12-08-2007, 04:54 PM
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.

DssCrazy
12-08-2007, 07:59 PM
So this will boost the speed of your site? also does this work on version:3.6.8?

Zia
12-09-2007, 05:34 AM
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

u can report it
http://xcache.lighttpd.net/report
OR u can post it at
http://forum.lighttpd.net/forum/4


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.

increasing var size - firstly u need to chk- if there any OOMs or not- unless u dont need to increase-
slowing down the site- there mite be many reason

So this will boost the speed of your site? also does this work on version:3.6.8?

yes- working with 3.6.8 - No Problem at all :)

Tralala80
12-15-2007, 06:05 PM
Can someone post a working php.ini (the xcache part) ?

I continuously get the following error:
Fatal error: XCache not installed in /includes/class_datastore_xcache.php on line 34

Link to phpInfo:
http://74.86.70.196/phpinfo.php

Here's my php.ini xCache part:


[Zend]
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

[xcache-common]
;; install as zend extension (recommended)
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
;; install as zend extension with thread-safe
; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so
;; install as PHP extension (extension_dir must be set to the full path to xcache.so)
; extension = xcache.so

[xcache.admin]
xcache.admin.user = "Trajcek"
xcache.admin.pass = md5($mymd5ishere)

[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 16M
xcache.count = 1
xcache.slots = 8K
xcache.ttl = 0
xcache.gc_interval = 0

xcache.var_size = 2M
xcache.var_count = 1
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300

xcache.test = Off
xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"
xcache.coredump_directory = ""
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off

[xcache.coverager]
xcache.coverager = Off
xcache.coveragedump_directory = ""


There are some cases too when apache fails to start

Paul M
12-18-2007, 08:25 PM
Just in case no one has noticed yet - xcache support has been added to vbulletin 3.7.

Icy
12-19-2007, 01:18 AM
Yesh! I'm using 3.7 I noticed it last night.

Hoffi
12-20-2007, 09:57 AM
That's great!

SeV3n
12-29-2007, 11:48 PM
MM it's a great modz but it has strange behaviors on my server. I got 2 vbulletin board on the same machine and using xcache datastore on both i got the same datastore on them even if the link to different db. :P

phpxcache
12-30-2007, 01:28 AM
i've added trouble shooting at the first post for those who have problem with a. mixing data, b. unserialize() warning

SeV3n
12-30-2007, 01:42 AM
i've added trouble shooting at the first post for those who have problem with a. mixing data, b. unserialize() warning
Ops i missed that advice... sorry.

( phpxcache are you mOO the xcache dev? )

phpxcache
12-30-2007, 02:12 AM
Ops i missed that advice... sorry.

( phpxcache are you mOO the xcache dev? )

never mind, the advice was post after your reply :)
and yes, i am.

SeV3n
12-30-2007, 09:57 AM
and yes, i am.
Great to hear :)
OT: Anyway I've just added you on MSN (i opened Ticket #158).

Ata123
01-09-2008, 11:09 PM
I applied the patch, and all I get is a blank page when accessing the forum.

I got a blank page, too, and no php error messages.

Removing blank lines at the bottom of class_datastore_xcache.php (any blank lines after ?> ) fixed it for me

netwind
01-10-2008, 11:56 AM
Does this hack must share variable $forumcache ?
I install all software. Checking xcache admin : variable 'forumcache' eats 1.8Mb.
ok but where is memory ?
Here debug from vbulletin :

Time Before: 0.00148 seconds
Time After: 0.00185 seconds
Time Taken: 0.00037 seconds

Memory Before: 196.090 KB
Memory After: 197.766 KB
Memory Used: 1.676 KB
Datastore Setup

Time Before: 0.00201 seconds
Time After: 0.04075 seconds
Time Taken: 0.03874 seconds

Memory Before: 197.926 KB
Memory After: 7,868.695 KB
Memory Used: 7,670.770 KB

is it normal ?

poprulz
01-13-2008, 06:20 PM
Disable other extension and see

;zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
;zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

Save and restart httpd, check php.info and see xcache is installed.


Can someone post a working php.ini (the xcache part) ?

I continuously get the following error:
Fatal error: XCache not installed in /includes/class_datastore_xcache.php on line 34

Link to phpInfo:
http://74.86.70.196/phpinfo.php

Here's my php.ini xCache part:


[Zend]
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

[xcache-common]
;; install as zend extension (recommended)
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
;; install as zend extension with thread-safe
; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so
;; install as PHP extension (extension_dir must be set to the full path to xcache.so)
; extension = xcache.so

[xcache.admin]
xcache.admin.user = "Trajcek"
xcache.admin.pass = md5($mymd5ishere)

[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 16M
xcache.count = 1
xcache.slots = 8K
xcache.ttl = 0
xcache.gc_interval = 0

xcache.var_size = 2M
xcache.var_count = 1
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300

xcache.test = Off
xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"
xcache.coredump_directory = ""
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off

[xcache.coverager]
xcache.coverager = Off
xcache.coveragedump_directory = ""


There are some cases too when apache fails to start

PING1434a
01-20-2008, 04:12 AM
Hi, Just wondering
Any way to get around these errors?

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 85

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 85

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 85

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 124

Warning: xcache_unset() [function.xcache-unset]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 123

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 124

Warning: xcache_unset() [function.xcache-unset]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 123

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 124

Warning: xcache_unset() [function.xcache-unset]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 123

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 124


I'm getting that everypage even with plug-in system turned off at moment.

phpxcache
01-20-2008, 05:51 AM
Hi, Just wondering
Any way to get around these errors?

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 85



I'm getting that everypage even with plug-in system turned off at moment.

check your phpinfo() page and see if XCache gets loaded and set properly, make sure you've updated the correct php.ini

TheMilkCarton
01-25-2008, 04:27 AM
Are there ways to make MORE use of the datastore with vBulletin? Only 24 things are caching in Xcache and they're barely taking any space... I'd just like to make more use of my var cache. :)

Zia
02-02-2008, 04:51 AM
Are there ways to make MORE use of the datastore with vBulletin? Only 24 things are caching in Xcache and they're barely taking any space... I'd just like to make more use of my var cache. :)

Try
https://vborg.vbsupport.ru/showthread.php?t=139151&highlight=xcache by Lendy

this mod use varcache
(discission is urs use it or not)

doraj
02-13-2008, 10:25 PM
Hello

An information please...I use vBSeo 3.1

In Control Panel vBSeo there is : Caching Options

Cache Type (BETA)
Select the caching system to use from the list below. Make sure that your server supports the selected cache type.

memcached
APC Cache
XCache
eAccelerator
If I active XCache here (for vBSeo options), Can I also install and active Datastore Cache to config.php or not?
Two activations can create some conflicts?

Thanks :)

dtv100
02-14-2008, 09:33 AM
OK when bar look really low mean is time to clear or to add more than 64mb to settings?

doraj
02-15-2008, 11:24 AM
If I use XCache Datastore, Can I also active "GZip Compression" to my AdminPC or are possible conflicts?

Thanks..

Mindwarp
02-16-2008, 10:10 PM
Just in case no one has noticed yet - xcache support has been added to vbulletin 3.7.

I saw where he said not to install the patch in the OP. I assumed the file was included somewhere in 3.7 but I haven't been able to find it.

Yes, I'm a newbie. :o

Icy
02-17-2008, 04:15 AM
I saw where he said not to install the patch in the OP. I assumed the file was included somewhere in 3.7 but I haven't been able to find it.
Just remove this modification then in ./includes/config.php
Search for:
// $config['Datastore']['class'] = 'vB_Datastore_Filecache';
Add underneath or replace it with
$config['Datastore']['class'] = 'vB_Datastore_XCache';

Mindwarp
02-17-2008, 05:44 AM
Thank you very much Icy. :)

punchbowl
02-17-2008, 09:05 PM
I applied the patch, and all I get is a blank page when accessing the forum.

are you php 5.0.x?

It's unsupported by xcache apparently. I get the blank pages too.

Amenadiel
02-29-2008, 10:31 AM
This is weird. I have applied the patch, but xcache isn't showing datastore items as cached. Just regular php: no language, usergroup or anything.

I have already uploades class_datastore_xcache.php, edited config.php and class_datastore.php. Should I enable something else somewhere? What am I missing here?

Icy
02-29-2008, 05:05 PM
Have you enabled varchache?

Amenadiel
02-29-2008, 07:08 PM
uh... varcaché? where should I do that?

Icy
03-01-2008, 02:19 AM
In your php.ini. i.e.
; same as aboves but for variable cache
xcache.var_size = 6M
xcache.var_count = 4
xcache.var_slots = 8K
; default ttl
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 0

Amenadiel
03-02-2008, 12:22 PM
Ok, I'll use this conf:

xcache.var_size = 16M
xcache.var_count = 4
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 0

I'll tell you how it goes.

Icy
03-02-2008, 12:44 PM
Have you installed XCache as PHP extension? Would you please post your php.ini?

Amenadiel
03-02-2008, 10:04 PM
yes, XCach? is running and I have 8 threads of php cached, but no cached vars.

https://vborg.vbsupport.ru/

IrPr
03-02-2008, 10:13 PM
Hi moo
such a nice work! my huge forum is on the fly with lighty n xcache

Opcode cache works like a charm, Variable cache is workin too but there is sth wrong with this class to me
it kills my forum when i swich datastore to this class! server load increases upto 12 then will changes frequency up and down
Im using XCache for Template Cache (https://vborg.vbsupport.ru/showthread.php?t=139151&highlight=xcache) module without such problem! template vars are cached and they'r fetching as charm
but for datastore it s*x! sth wrong when cachin or probably fetchin

here is my xcache admin interface snaps which indicates what i wrote
76647
and here is my xcache configuration using 8 splits due to SMP CPU ( Clovertown Quad Core )
[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 32M
xcache.count = 8
xcache.slots = 16K
xcache.ttl = 0
xcache.gc_interval = 0

xcache.var_size = 32M
xcache.var_count = 8
xcache.var_slots = 16K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300

xcache.test = Off
xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"

xcache.coredump_directory = "/tmp/phpcore/"
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off

[xcache.coverager]
xcache.coverager = Off
xcache.coveragedump_directory = ""

PS: i loaded xcache.so with zend extension, not default extensions directive

Please help me guys, any suggestion is welcome!

Regards

IrPr
03-02-2008, 10:27 PM
yes, XCach? is running and I have 8 threads of php cached, but no cached vars.

http://www.chilehardware.com/images/breves/200803/1204502686_xcache_chw.jpg
Seems config.php issue to me
make sure that ur config.php is clean by one $config['Datastore']['class'] assigned by 'vB_Datastore_XCache' and not commented out!

IrPr
03-02-2008, 10:35 PM
If I use XCache Datastore, Can I also active "GZip Compression" to my AdminPC or are possible conflicts?

Thanks..

Ofcourse You can, theres no relationship between PHP Output handlers (GZIP or Deflate) and PHP Opcoder/Variable cachers ( XCache or APC or eAccelerator )

Amenadiel
03-03-2008, 09:09 PM
Ok I solved the mistery. I spoke to the machine admin (I run the forum but I avoid messing with server configuration for I am no linux expert) and he told me that he compiled xcache without var cache support. He thought it wasn't necessary.

We will recompile in a few days. I'll update you guys then.

Icy
03-04-2008, 01:52 AM
IrPr! You should increase the memory for op code cache. OOMs (out of memory) is no good. Try using 64 MB & see if there are any OOMs.

IrPr
03-04-2008, 11:07 AM
IrPr! You should increase the memory for op code cache. OOMs (out of memory) is no good. Try using 64 MB & see if there are any OOMs.
Thanks Icy, i will increase
but what about Datastore class issue? i mean Variable cache
any idea?

BTW is there any other modification which conflicts with?

Icy
03-05-2008, 05:59 AM
What PHP version are your using? If PHP 5.2.5 then check this link (http://forum.lighttpd.net/topic/42805) & downgrade to PHP 5.2.4.

IrPr
03-05-2008, 11:52 AM
What PHP version are your using? If PHP 5.2.5 then check this link (http://forum.lighttpd.net/topic/42805) & downgrade to PHP 5.2.4.
I did but still same problem
i get no segment error but server load still increases
here is my phpinfo() (http://64.15.139.54/inFo.php)
MOo please help

Amenadiel
03-06-2008, 12:35 AM
ok recompiled xcache and still no datastore vars are going into it.

Here's my phpinfo by the way

http://www.chilehardware.com/info.php

Icy
03-06-2008, 03:18 AM
IrPr - Make sure the OOMs disappear.

Amenadiel - Double check that you have proparly uploaded the class_datastore_xcache.php & edited correctly class_datastore.php & config.php

Amenadiel
03-15-2008, 12:29 AM
Already did. Perhaps it's a problem of file permisions... perhaps I should set datastore_xcache as an exception in lighty in order to avoid being redirected by vbseo?

where is class_datastore.php being called? I can't see an entry in config.php, just

$config['Datastore']['class'] = 'vB_Datastore_XCache';

must I enable datastore caching somewhere in config or admin panel?

Anyway, why not install memcached or file based datastore?

eido
03-16-2008, 07:40 PM
how do i know what value do i put for xcache.size and xcache.var.size ? whats the best values?

tfw2005
03-23-2008, 10:10 PM
Hey guys,

I have xcache installed on the server as a whole, and it sped up my forums greatly. Page loads went from 5-8 seconds to under 2 for the vbulletin areas.

Would installing this hack (Im on pre 3.6.X) for the datastore, provide an even greater increase to speed, load, etc?

I have a pretty busy forum with some heavy scripts running along side (multiple G2 galleries, etc etc). So if I can reduce further the forum needs, those other scripts might speed up too.

Just wondering if applying this to datastore is worth it if it is already kicking ass on a PHP level.

Thanks!

frantorm
04-01-2008, 07:07 PM
Before upgrading to 3.6.9 vb had in this mod version 3.6.8 installed and my vbulletin was very fast now after upgrading will not let me install this mod and is very slow

that I can do?

Thanks

GTX2
04-01-2008, 09:02 PM
i have no idea how to install xcache on the server... i run a centOS server and i've tried either using rpm and yum install....

any idea?
thanks

hydn
04-07-2008, 06:22 PM
Hey guys,

I have xcache installed on the server as a whole, and it sped up my forums greatly. Page loads went from 5-8 seconds to under 2 for the vbulletin areas.

Would installing this hack (Im on pre 3.6.X) for the datastore, provide an even greater increase to speed, load, etc?

I have a pretty busy forum with some heavy scripts running along side (multiple G2 galleries, etc etc). So if I can reduce further the forum needs, those other scripts might speed up too.

Just wondering if applying this to datastore is worth it if it is already kicking ass on a PHP level.

Thanks!
Same question here

sturdy
04-08-2008, 11:21 AM
How to install the X-Cache under Windows?

I just found this INSTALL File with this text in it:

# vim:ts=4:sw=4
Installtion:

$ phpize --clean && phpize
$ ./configure --help
$ CFLAGS='your cflags' ./configure --enable-xcache --enable...
$ make
$ su
# make install
(update php.ini, restart php)

Reinstall:

$ mv config.nice conf
$ make distclean && phpize --clean && phpize
$ mv conf config.nice
$ ./config.nice
$ make
$ su
# make install
(update php.ini, restart php)

Update php.ini:
$ su
# cat xcache.ini >> /etc/php.ini
# $EDITOR /etc/php.ini


I cant explain what to do :D

Fenriz
04-11-2008, 02:37 PM
Please somebody help me with 3 questions:

I have 512Mb on my dedicated. Is it right to make:
xcache.size = 64M
xcache.var_size = 64M
?
I have a Template Cache 0.0.4 installed and not sure about the size of xcache.

Do I need to enable xcache.optimizer? Default it is in Off state. Do I need to make
xcache.optimizer = On
?

I have a Fedora 7 installed on my server.
Is it better to make xcache.so in xcache.ini installed as a zend_extension or php extension? I have "extension = xcache.so" uncommented.

By the way, here is my phpinfo http://www.ulver.com/info.php
Thanks in advance.

hydn
04-11-2008, 02:46 PM
xcache.var_size = 4M or 8M is fine

Don't have to be the same size.

Why not use memcahce instead?

Fenriz
04-11-2008, 03:40 PM
hydn, is it possible for xcache and memcached to co-exist? If I have xcache installed as an oppcache, how should I install memcached?

hydn
04-14-2008, 06:49 PM
hydn, is it possible for xcache and memcached to co-exist? If I have xcache installed as an oppcache, how should I install memcached?
Yes. It is. operation code and variable cache are two different things. If your database and web server are on the same box I would recommend you use xcache for opcode & datastore. If on separate boxes then use memcache for datastore of vb install on database server and xcache will run as usual on web server.

hope that helps.

Fenriz
04-15-2008, 11:41 AM
Ok, thank you. My database and web server are on the same box, so I'll continue to use xcache for opcode & datastore.

One more question - Is it better to make xcache.so in xcache.ini installed as a zend_extension or php extension?

hydn
04-15-2008, 12:29 PM
In IIS zend conflicted with xcache for me. If it works for you use it. But not necessary. If you do use it benchmark because i'm not sure it will make things faster with xcache.

e7lew
04-22-2008, 10:07 PM
xcache installed in the server and i applied all changes

still getting the error above

Fatal error: Class vb_datastore_xcache: Cannot inherit from undefined class vb_datastore in /home/al7elwa/domains/al7elwa.com/public_html/board/includes/class_datastore_xcache.php on line 14

any help please

Amaresh
05-06-2008, 09:03 PM
Thanks working fine on Cent OS with Lxadmin, lighttpd...

Though no benchmarks done yet.

TheInsaneManiac
08-31-2008, 09:10 PM
3.7 anyone?

Icy
09-01-2008, 02:51 AM
3.7 anyone?
You don't need this plug-in in 3.7 because 3.7 already have this. You just have to enable it in your config.php under the ****** DATASTORE CACHE CONFIGURATION ***** option. Just type $config['Datastore']['class'] = 'vB_Datastore_XCache'; & save it.

thompson
09-01-2008, 09:33 AM
You don't need this plug-in in 3.7 because 3.7 already have this. You just have to enable it in your config.php under the ****** DATASTORE CACHE CONFIGURATION ***** option. Just type $config['Datastore']['class'] = 'vB_Datastore_XCache'; & save it.

and it works ? forums are really faster ?

Icy
09-01-2008, 12:32 PM
and it works ? forums are really faster ?
I think so. Actually I'm using it since it's been released here. So it's kind of hard to say that forums are really faster or not. But the caching works flawlessly.

Zia
09-16-2008, 08:18 AM
hydn, is it possible for xcache and memcached to co-exist? If I have xcache installed as an oppcache, how should I install memcached?

No U dont need memcache at all.. Xcache will do everything for u and it works better (most of the review says it all)

asasi
09-17-2008, 04:55 AM
Hi
I followed installation path but some pages on my forum will open just showthread.php has problem. when I try to open a threat I have 500 internal server error !
This is my php.ini file in forum folder:

[PHP]



[xcache]
zend_extension="/usr/php4/lib/php/extensions/no-debug-non-zts-20020429/xcache.so"
xcache.cacher = On
xcache.test=1
xcache.size = 1M
xcache.count = 1
xcache.var_size = 10M
xcache.var_count = 1
xcache.var_slots = 1000
; xcache.mmap_path = "/dev/zero"
xcache.mmap_path = "/home/ziafatco/tmp/xcache"
xcache.readonly_protection = Off
xcache.optimizer = Off
xcache.coredump_directory = "/home/ziafatco/tmp"
;xcache.coveragedump_directory = "/tmp/pcov/"
xcache.coverager = On


thanks in advance

GTX2
01-09-2010, 07:36 PM
I've tried everything and after three days trying to install xcache, everything is ok now when checking phpinfo, but when browsing forums i get always this error:

xcache.var_size is either 0 or too small to enable var data caching

in phpinfo i have xcache.var_size = 64MB
but in php.ini i have xcache.var_size = 4MB


How to solve this ?
thanks


PS- sorry replying such old thread