Hardware and performance

Picture of Esteban Sánchez
Performance problems in Moodle 2.3

We are migrating from Moodle 1.9 to Moodle 2.3 but we are suffering some performance issues with version 2.3. In the document attached to this post you can find a summary of the system environment features.

 The thing is that in 2.3 the web pages  take more time to be loaded (nearly 300 ms slower). The load time we get when trying to download the page using firefox and assuming the browser has already cached some content is:

         - Moodle 1.9 --> 468 ms

         - Moodle 2.3 --> 812 ms

In addition, the main web page of moodle2.3 shows us error messages such as:

"Unknown property 'Xposition'. Declaration rejected. "Yui_combo.php: 32

Furthermore, user authentication takes a long time to succeed if we compare it with moodle 1.9:

         -  Moodle 1.9  --> 2422 ms

         -  Moodle 2.3 --> 3124 ms

The following URL is also requested during the authentication in moodle2.3.  What is this page used for?  


In order to optimize performance we have reviewed and implemented some recommendations listed in:


Regarding to php acceleration, we are using APC in moodle2.3  and  eaccelerator is being used in moodle1.9. The reason for using APC in moodle2.3  instead of eaccelerator is that the latter seems not to work properly with the php version used  in moodle2.3 (php5.3.13). In fact, pages of Moodle’s administration module are shown blank when we use eaccelerator in moodle2.3  (perhaps php.ini is misconfigured ? some suggestions?)

As far as database is concerned, both database schemes (moodle2.3 moodle1.9) are running over the same  instance of Oracle 10g database which is accessible remotely.

We would like to receive your comments and suggestion about the following issues:

-  Moodle 2.3 is by default  slower than 1.9? (According to other posts the answer would be yes I guess)

-  What version of Linux could offer better performance with Moodle? (We are thinking about reinstalling it on Red Hat or Ubuntu in order to see if it works better than SLES)


- Using LAMP offers  better performance than installing  apache and php separately?


-  What of these options could offer better performance compressing web pages:

  • The apache module “mod_deflate”
  • The module “ mod_pagespeed” developed by google for apache

Thanks in advance for any comments or suggestions smile

Average of ratings:Useful (1)
Picture of Howard Miller
Re: Performance problems in Moodle 2.3
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

I was too lazy to read your attached document, but some things to think about...

- all else being equal, Moodle 2.3 is a bigger application that 1.9. I would confidently expect it to be slower. I tell people that a starting point is to double the server resources going from 1.9 to 2.x

- you have to be insane running with an Oracle database. Sorry but you do. It just isn't intended for this sort of thing. You will be orders of magnitude faster using MySQL or PostgreSQL. That's your number one issue.

Average of ratings:Useful (1)
Picture of Esteban Sánchez
Re: Performance problems in Moodle 2.3

Thanks Howard for your comment. I agree wiht you that Oracle is note the best choice but for many reasons we can´t change it.

Average of ratings: -
I Teach With Moodle
Re: Performance problems in Moodle 2.3
Group Testers


sorry I don't have time to fully answer your post but you might be interested in the (non-scientific) testing I ran a few weeks back. I wanted to see just how much more demanding each new versions of Moodle actually are.

Results and methodology at http://www.iteachwithmoodle.com/2012/10/12/moodle-performance-testing-how-much-more-horsepower-do-each-new-versions-of-moodle-require/


Average of ratings:Useful (2)
Picture of Esteban Sánchez
Re: Performance problems in Moodle 2.3

Hi Frederic,

Thanks for your answer. Your testing is great and It makes clear that moodle 1.9 is by far faster than moodle 2.x.  As part of the conclusion of your tests you suggests using a php accelerator. As you can see in my post we have installed APC as PHP accelerator because eaccelerator didn´t work properly. Do you consider that APC is a good option or may be there is another better option to use with moodle 2.x?

Thanks in advance

Average of ratings: -
Picture of AL Rachels
Re: Performance problems in Moodle 2.3
Group DevelopersGroup Particularly helpful MoodlersGroup Testers

Hi Esteban,

When using APC you will need to do some tuning for the memory size. By default it is set to use only 64 MB which basically will get used up by Moodle 2.3 or 2.4 on just about any page load. Put a copy of apc.php on your site and look at the statistics. Right now on my small site with Moodle 2.3.2+ and Moodle 2.4 Beta, I am using 320 MB and it stays almost full all the time.

Average of ratings: -
I Teach With Moodle
Re: Performance problems in Moodle 2.3
Group Testers

Hi Esteban,

glad you found it helpful. APC works great, it is the PHP accelerator that is recommended by the PHP developers and it will supposedly come bundled with PHP6. Make sure you give it plenty of RAM so that it can cache everything. By default it comes only with 32MB I think and that's not even enough to cache the Moodle folder with all its scripts. I have set mine to 256MB. I can share my configuration file if you like.

Average of ratings: -
Picture of Esteban Sánchez
Re: Performance problems in Moodle 2.3

Hi Frederic and AL,

Thanks for your reply. If Frederic (thanks for the offering) or anyone could share his APC configuration I would appreciate it. I have set my APC to 250 MB and my run time settings are:

apc.cache_by_default 1
apc.canonicalize 1
apc.coredump_unmap 0
apc.enable_cli 0
apc.enabled 1
apc.file_md5 0
apc.file_update_protection 2
apc.gc_ttl 3600
apc.include_once_override 0
apc.lazy_classes 0
apc.lazy_functions 0
apc.max_file_size 1M
apc.num_files_hint 1000
apc.report_autofilter 0
apc.rfc1867 0
apc.rfc1867_freq 0
apc.rfc1867_name APC_UPLOAD_PROGRESS
apc.rfc1867_prefix upload_
apc.rfc1867_ttl 3600
apc.serializer default
apc.shm_segments 1
apc.shm_size 250
apc.slam_defense 1
apc.stat 1
apc.stat_ctime 0
apc.ttl 0
apc.use_request_time 1
apc.user_entries_hint 4096
apc.user_ttl 0
apc.write_lock 1


Average of ratings: -
I Teach With Moodle
Re: Performance problems in Moodle 2.3
Group Testers

Hi Esteban, 

your configuration looks similar to mine. As Al mentioned, you'll need to check whether your cache fills up, and more importantly if it gets fragmented. No fragments = better performance. 

There are 2 changes I would make to your configuration:

  • up apc.max_file_size to 10M
  • turn off apc.stat



Average of ratings: -
Picture of Esteban Sánchez
Re: Performance problems in Moodle 2.3

Thanks for your reply it has improved the time of loading. Reviewing your tests I have seen that you are using memcahed. This is a feature which I don´t have installed yet. I was reading about it and I suppose that it can improve the performance by caching the content from the database ( I figure up that APC only catches the php code). Is that true?

I would like to comment that I added a new post in this forum about the oci8 driver and its configuration in:


If you don´t mind I would be interested in your opinion about this issue. Thanks for all

Average of ratings: -