Alpha Release of XCache Module for Drupal 6

I've just hacked together an XCache module for D6. It requires a patch to cache.inc, however so far I'm seeing fairly decent results.

More information can be found here: http://www.jbip.net/content/alpha-release-xcache-module-drupal-6

Josh

is that why your site is SOOO fast ;)

zilla - March 24, 2008 - 22:56

your drupal install is very fast, like nearly instant for me...

could you explain for the very non technical types exactly what xcache does that's better that the standard drupal caching (or advanced caching) doesn't do? does it work with logged in users? (drupal's does not, correct?)

is there a lot to it in terms of installing and all of that?

On that site I just have the

boydjd - March 25, 2008 - 00:39

On that site I just have the opcache, and not the variable caching, yet. http://dev.jbip.net has the variable caching in place.

XCache stores all of your php code compiled in memory, as well as all php variables in memory. So it's /much/ faster than reading from the database.

There's not too much to installing it, and I'll be posting up instructions on my blog on how to do so.

Joshua Boyd
joshua.d.boyd at gmail dot com

Comments

kbahey - March 24, 2008 - 23:40

As of Drupal 5, cache.inc is pluggable, so in settings.php you can say:

$conf = array (
  'cache_inc' => './modules/all/mymodule/mycache.inc',
);

And it will point to your file, not the standard Drupal file.

Another comment is: why not join forces with Steven Rude and work on the existing project for xcache? http://drupal.org/project/xcache
--
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc.
Personal blog: Baheyeldin.com.

I'll have to modify it so

boydjd - March 25, 2008 - 00:40

I'll have to modify it so that it's pluggable, thanks. Also, his code is not in a workable state.

Steven's project hasn't been updated since December.

Joshua Boyd
joshua.d.boyd at gmail dot com

thank you joshua - that site is even faster ;)

zilla - March 25, 2008 - 01:17

i look forward to using this - if you're able to write up any moron-proof directions, i'm happy to test it out on my d6.1 development site...

out of curiosity, if it's caching php, will this mess up any of the modules? must cache times be set short or cleared out with cron to make things work? and will it in any way conflict with default/core caching for anonymous users?

my understanding is that this improves performance for both anonymous and logged in users, which is way cool...

I'll have to look more in

boydjd - March 25, 2008 - 01:44

I'll have to look more in depth into the anon/logged in users. The way it's written right now, it's still using core caching for arrays/objects/serialized data until I figure out a reliable way to get them into xcache. XCache and APC don't natively support these types of variables. I may peek into the APC module to see how those folks are doing it (or if they are).

It shouldn't mess up any modules on a production site. You would have to clear the cache via the admin interface if you were to upgrade code or something like that.

Are you currently running fastcgi for php on your development server?

Joshua Boyd
joshua.d.boyd at gmail dot com

i have no idea about fastcgi

zilla - March 25, 2008 - 02:36

i'm on a grid container at mediatemple.net - mysql4.x right now (soon to be 5 when they get off their asses) and php 5.x - not sure what their other specs are but i can certainly ask to see what it is...

Also, that dev site, is

boydjd - March 25, 2008 - 01:45

Also, that dev site, is basically vanilla core with my module and devel module added in. With 10,000 nodes, 10 comments per node, and 500 or so dummy users loaded in. So I don't know how representative of the "real world" it is.

Joshua Boyd
joshua.d.boyd at gmail dot com

Very nice

andreiashu - April 4, 2008 - 02:15

Very very nice :) Currently i'm using eAccelerator with D5 but ill test XCache and your patch with D6. I can barely wait to see the results.
Cheers

 
 

Drupal is a registered trademark of Dries Buytaert.