Status
Not open for further replies.

Badger

Customer
I thought this might be of interest for those customers using MemCache with vB Optimise ... :)

http://articles.digitalpoint.com/content.php?r=14-Monitor-Memcached-Servers-With-vBulletin

Here's what it reports for our site running MemCache and vB Optimise Pro ...

Does the information it shows indicate that 64 Mb is more than enough to handle vB Optimise? Is there anything else it shows that would indicate we should make any changes to the settings we have for either vB Optimise or MemCache"

Regards,
Doug
 

Attachments

  • Screen shot 2011-03-20 at 10.04.50 AM.png
    Screen shot 2011-03-20 at 10.04.50 AM.png
    54.1 KB · Views: 7
  • Screen shot 2011-03-20 at 10.04.29 AM.png
    Screen shot 2011-03-20 at 10.04.29 AM.png
    85.8 KB · Views: 7
Memcache doesn't allocate the full amount of MB you give it during startup, it dynamically takes as much memory as it needs.

That means that thus far it has only needed to allocate 64 MB of data, that doesn't mean one should limit the startup to 64mb as that may give unexpected results when you go over this cap.
 
Thanks Fillip ... :)

MemCache is still making an incredible difference to our site ...

I also found this recommendation by Sean at Digitial Point ....

Using Memcache Datastore More Efficiently
If you use Memcache as your datastore, you can make it faster by getting multiple datastore keys in a single pass (Memcache supports it, why not use it?).

In includes/class_datastore.php, within the vB_Datastore_Memcached::fetch() method, replace this:

PHP:
$unfetched_items = array();
foreach ($items AS $item)
{
    $this->do_fetch($item, $unfetched_items);
}

with this:

PHP:
if ($this->prefix) {
    foreach ($items as $item) {
        $items_fetch[] = $this->prefix . $item;
    }
}
else
{
    $items_fetch =& $items;
}
       
$items_found = $this->memcache->get($items_fetch);
$unfetched_items = array_keys(array_diff_key(array_flip($items_fetch), $items_found));
foreach ($items_found AS $key => $data)
{
    $this->register(substr($key, strlen($this->prefix), 50), $data);
}

This will make getting your datastore (needed for every page view) about 20% faster. Memcache is very fast either way, so you probably won't notice much of a difference, but there's no point in *not* making something faster when you can in my opinion.

You think this would optimize our MemCache uses with Vb Optimize even further?

Thanks ...

Regards,
Doug
 
Good stuff, DigitalPoint contributed to the development of vBOptimise in the first place, so it's no surprise that he's able to optimise vB further (we deliberately didn't ask for permissions to use his file edits in the mod, partly to bring some traffic and credit back to him, and partly because we at DBTech shy away from file edits by whatever means possible) :)
 
Interesting .... :confused:

I removed the MemCache optimization change for now, as it actually seemed to slow down the effectiveness of MemCache on our site, when used with vB Optimize. (see pic)

I don't know whether it's just coincidental to something else happening, or a direct result of the change to class_datastore.php, however, I've temporarily replaced the modded file with the 4.04 vBulletin original file, just to see if the datastore usage rises again.

Regards,
Doug
 

Attachments

  • Screen shot 2011-03-23 at 7.10.02 AM.png
    Screen shot 2011-03-23 at 7.10.02 AM.png
    63.8 KB · Views: 2
Status
Not open for further replies.

Legacy vB Optimise

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
1,972
Customer rating
0.00 star(s) 0 ratings
Back
Top