3 things to do to enhance speed.

3 things to do to enhance speed.

by Sarah Jane -
Number of replies: 5

Hi Guys,

Moodle 2.4.4

I have had a real pain trying to get my site load faster until now. Although I have only done the first item of the 3 things recommended I have noticed a real difference in the page load. Still slow but better.

Hope this help anyone out there having difficulty in their speed.

http://www.youtube.com/watch?feature=player_embedded&v=IQKVtAMyiG0

Regards  Sarah x

 

Average of ratings: -
In reply to Sarah Jane

Re: 3 things to do to enhance speed.

by Greg Padberg -

I will share what made a huge difference on my server.  We deployed a new Moodle server last summer on Ubuntu Server 12.04 LTS with Moodle 2.2 installed, after upgrading from Moodle 1.9 installed on an older server.  The new server crashed a few times last September due to load when classes resumed.  The new server existed in a virtual environment so it was easy to allocate more RAM memory and CPU processors / cores.  Adding memory and CPU did not eliminate the crashing because the problem was HOW the server made use of available memory rather than the amount of memory or cpu available.

First huge improvement (and successive smaller improvements) was to run mysqltuner script and follow the suggestions.  After some tweaking of mysql memory usage settings in /etc/mysql/my.cnf the server could handle much more load and did not crash.

Next significant performance improvement was to install and configure APC PHP accelerator (php-apc).

My benchmark is to have any Moodle pages load in less than a second.  Most are around the 0.5 seconds or less as indicated by enabling Site administration > Development > Debugging > Performance info.

So in summary, tuning the mysql database settings using mysqltuner kept the server from crashing under load.  And installing APC PHP cache enabled the pages to load much quicker.  Both of these must be tuned to some degree based on your installation.

If your server is based on Ubuntu, both mysqltuner and php-apc are readily available from the repositories.

Average of ratings: Useful (3)
In reply to Sarah Jane

Re: 3 things to do to enhance speed.

by Frankie Kam -
Picture of Plugin developers

Hi Sarah

Thanks for highlighting this video. I invested 28 minutes watching the video and it was very informative. Here are 2 screenshots I took of the salient points.

and

I also just want to share the most visited post (with a very modest 5K+ hits) on my Moodle blog which is this one - it's very much related to the topic! For some reason, this particular blog post gets an average of 220 hits a day. Maybe it's because others are struggling with the same problem...anyway, I just thought I'd mention this because I still remember the thrill and rush I felt when I managed to get my then Moodle 1.9.7 to really speed up. Enjoy.

Frankie Kam

In reply to Frankie Kam

Re: 3 things to do to enhance speed.

by Frankie Kam -
Picture of Plugin developers

> is particular blog post gets an average of 220 hits a day.
>
Correction. An average of 250 hits a week5,442 hits since July 2011. Not too bad considering the other 145 posts on my blog.

 

In reply to Frankie Kam

Re: 3 things to do to enhance speed.

by David Scotson -
Can I suggest turn on SPDY as a 5th item, which meets the "low effort, big impact" goals. I started another thread about it here:

https://moodle.org/mod/forum/discuss.php?d=231445

If anyone's already doing this reporting back to the community so this can become a recognized best practice for Moodle could speed up a lot of Moodles.
In reply to Sarah Jane

Re: 3 things to do to enhance speed.

by CP Lau -

Hi Sarah. May i ask how you configure the MUC? Use the default setting?