Please post your recommendations on PHP-accelerators for Moodle here. And don't forget to mention the hardware, system software and the Moodle version.
I'm using eAccelerator 0.9.5.3. And I am pleased with its performance. I allocated 50Mb RAM for it on my Linux VPS system.
Didn't try the other accelerators. Time factor. Also "if it ain't broken, don't fix it".
Very helpful discussion topic. Wondering if we could have folks list constituent base (number of active courses, number of active users)?
We're using APC. Simple to install on new Debian/Ubuntu installations
$ sudo apt-get install php-apc
Configure it to use a shared memory segment big enough to hold the Moodle code. On our 1.9 installation, 32MB (the default) is way too small, 64MB not quite enough. So I configured it to use 96MB.
This may be bigger than the maximum shared memory segment allowed on your system (/proc/sys/kernel/shmmax), but if apc has been compiled with mmap support, it can use a shm segment of practically any size.
Also set apc.max_file_size to something bigger than the default 1MB, otherwise it won't cache files like lib.php, weblib.php and moodlelib.php.
Some stats from our site:
472.59 cache requests/second
6362 unique logins in the last 24 hours
1288 active courses
Thanks for the instructions. I'm testing APC now. Haven't gone through a heavy peak yet.
I have to make sure that exams (quiz) work properly. Do you, or others, have experience with quizzes with embedded videos?
The installation could be as simple as
# apt-get install php-apc
# zcat //usr/share/doc/php-apc/apc.php.gz /var/www/moodle/admin/
(The webpage http://your.site/moodle/admin/apc.php will display the APC INFO.)
# /etc/init.d/apache2 restart
The configuration is through /etc/php5/conf.d/apc.ini (don't forget to restart apache).
There's page of its own for APC and Windows: http://docs.moodle.org/en/Installing_APC_in_Windows
I have not done any direct comparison, with and without APC. This benchmarking , dated 2008, reported an improvement by a facter of 3 for Drupal.
We use memcached in a 8000+ users Moodle (1.9.x).
But in Moodle, if you have a course with more than 100 teachers, a cache would be of no consequence. Or -at least- it's performance could be severily cripled...
We have a special case course, that is made of more than 170 teachers and around 800 students/participants.
In that situation, that course just to load takes around 13secs. A "normal" course (with 4 or 5 teachers and around 200 to 300 students) loads in 0.13 secs.
Since every environment is different, one should test and measure different implementations, I think that there are no "one size fits all" sollution.