XCache with Moodle

XCache with Moodle

by Ângelo Rigo -
Number of replies: 8
Hi

Anybody is using XCache ? (http://xcache.lighttpd.net/).

It was highly recommended by a reliable server admin manager, using in production servers by one year and counting ...

It is a memory cache wich makes the bytecode generated after the parser being cached and it verifies if the file was modified if not it uses the bytecode from the memory. The performance gain in some cases was 60%, and can gain more.

It is compatible with Zend Optimizer, ION
Cube, can be instaled togheter without conflicts.

Also this project have a large documentation.

I would like to know about the experiences that anyone may have using Xcache with Moodle.

Thank´s in advance
Average of ratings: -
In reply to Ângelo Rigo

Re: XCache with Moodle

by Ken Wilson -
Hi Ângelo

I've used it in preference to other PHP cacheing systems - primarily for large sites (>1000 users). In terms of performance, the gains are nearly the same as APC (see this as one of the many comparisons available). But for large numbers of concurrent users, APC frequently gives blank pages (things may have changed now, so this statement may not be true anymore) whereas Xcache doesn't.

Ken
In reply to Ken Wilson

Re: XCache with Moodle

by Ângelo Rigo -
Hi Ken

It´s easy to use xcache ? wiwch steps you follow to set up xcache in the webserver ?

How do you configure moodle to work with xcache ?

Thank´s in advance
In reply to Ângelo Rigo

Re: XCache with Moodle

by Ken Wilson -
The installation is listed in this doc (http://xcache.lighttpd.net/wiki/InstallFromSource). If you're using Windows, then there is also a pre-build binary with support for apache and IIS.

Here are the settings that I have changed from the defaults, which work well with Moodle:

[xcache-common]
extension = xcache.so
[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 96M
; set xcache.count to the number of processors (cat /proc/cpuinfo | grep -c processor)
xcache.count = 4
xcache.slots = 2K
xcache.readonly_protection = On 
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off

Don't forget to set the admin interface so that you can see how well your cache is being used (see attachment). The key figure to monitor is OOMs (Out of Memory errors). If you get any of these, increase xcache.size.

Good luck!

Ken
Attachment xcacheadmin.jpg
In reply to Ken Wilson

Re: XCache with Moodle

by seth washeck -
do we need to set anything in the "performance" section of the moodle administration area?
In reply to seth washeck

Re: XCache with Moodle

by Ryan Panning -
I second this question, the Moodle cache options are confusing. XCache is the only thing that works on our server but there isn't an option in the drop-down for that...
In reply to Ryan Panning

Re: XCache with Moodle

by Zvonko Martinović -
We are using XCache on our production server with great success (it has almost tripled the number of concurrent users that we can handle). You don't need to setup Moodle to work with it.
Prior to choosing XCache we have performed tests to compare Xcache and eAccelerator. We have used app I made specially for this (application can open arbitrary number of unique connection to Moodle, login to Moodle and access arbitrary resource/activity). Our test have shown that with eAccelerator we get a slightly lower page load time, but higher server load (CPU and memory) than with XCache . Because of this we have went with XCache

Regards,

Zvonko
In reply to Zvonko Martinović

Re: XCache with Moodle

by Ryan Panning -
So in your Server > Performance settings you have None specified as the Cache Type? And do you have Record Cache turned on?

What do you see if you have Server > Debugging > Performance info turned on? I don't have any cache hits or anything, which is expected if nothing was specified...

Thanks for your feedback!
In reply to Ryan Panning

Re: XCache with Moodle

by Zvonko Martinović -
Yes, cachetype is set to none and rcache is turned off. If I turn perfdebug on, I don't get any hits (no matter if cache is turned on or of in Moodle) as you have noticed