Mod_deflate is an Apache web server module that uses compression to reduce the bandwidth needed to send web pages between the server and the end user's computer.
See http://httpd.apache.org/docs/2.4/mod/mod_deflate.html
Modern web applications such as Moodle send a lot of text from HTML code, to CSS styles, to javascript, all of which can achieve high compression rates.
So how does reducing bandwidth usage make your website faster? It's actually a bit of a trick. The website itself probably isn't really faster in terms of the number of users or pages it has the capacity to generate. Each page probably will take about the same build time as before on the server. In fact if your server's undersized in terms of CPU resources it might even reduce the server's overall capacity. But for the end user the perceived responsiveness of the website is significantly increased. This is because it takes a lot less time for the page to be transported from the server to the user's computer. This can have a significant impact on user satisfaction and is relatively easy to setup for knowledgable administrators. On a recent engagement, I actually saw a 2-3 second improvement in page load times for the end user, even while accessing from the local campus network. Needless to say the Moodle administrator for this site was very happy with the improvement and you will be too!
A discussion of open source eLearning tools covering Moodle, Alfresco, Mahara, and Kaltura amongst other technologies. Posts range from interesting anecdotes and adventures, to practical tips, to big picture discussions of trends and learning theory.
Showing posts with label Moodle performance. Show all posts
Showing posts with label Moodle performance. Show all posts
Friday, April 17, 2015
Monday, October 8, 2012
Why Your Moodle Site is Slow: Five Simple Settings
Here are some simple settings that any Moodle administrator can change from the Site Administration menu that will help to improve his/her Moodle site's performance. Some of these changes come at the cost of functionality, so sometimes you have to pick between a particular feature and performance (or a faster server), but often these settings are just enabled out of curiosity with no discernible reward other than a slower site.
Automated backup setup
Disable Automated backup setup for courses by setting Active to disabled in the pull down menu. The Moodle course backup and restore feature, while a convenient mechanism for moving courses between Moodle sites, is not very efficient. As the number of courses and the size of the courses on your site increase, the scheduled course backup process takes longer and longer to complete. This can cause extreme site slowdowns while it's running. Additionally, it makes it harder for your server's backup system to complete its own nightly backups.![]() |
Site administration / ▶ Courses / ▶ Backups / ▶ Automated backup setup
|
Many users mistakenly view this as a way to restore their Moodle site in the event of a disaster. While it's possible to use these course backups to restore most of a site, it's not ideal or guaranteed to work when you need it. Disaster recovery backups should be performed outside of the scheduled course backup feature.
Statistics
Make sure Enable statistics is unchecked. Many administrators discover this setting and turn it on simply to see what it does. A common scenario is that a site will be performing well for a year or more and then suddenly experience problems when this setting is enabled. This setting includes options for how long to allow the statistics gathering to run in one session and how far back to process. If you must run statistics make sure to limit how long you allow the process to run. I recommend letting it run no more than 2 hours per session.![]() |
| Site administration / ▶ Advanced features |
Theme designer mode
Disable Theme designer mode on production Moodle sites. Theme designer mode is a great Moodle version 2 feature, if you are updating your theme and want to quickly see the impact of changes. It does this by having the Moodle server tell web browsers to not cache any of the images, css, and javascript that make up your theme. When this feature is enabled, every page view for every user must download every media object directly from the Moodle server. This makes viewing pages very very slow and greatly increases the load on the server. Administrators often enabled this to update their theme and then forget to turn it off. The best practice is to develop your theme on a testing site and then move it over to production only after it has been completed.![]() |
Site administration / ▶ Appearance / ▶ Themes / ▶ Theme settings
|
Cleanup
Set Keep logs for and Grade history lifetime to 365 days or less. By default Moodle will keep both your logs and grade history forever. For long established sites, these logs start to become the majority of the database. I have seen cases where log tables consumed 90% or more of the database. As a general rule the more of your database that fits into your server RAM the faster your database will perform. By limiting the size of these logs, you can make your site much faster.![]() |
Site administration / ▶ Server / ▶ Cleanup
|
Session Handling
Disable Use database for session information by unchecking the box. Starting with Moodle version 2 and above the default setting is to have database sessions enabled. In our infrastructure, we have seen much better performance using file based sessions rather than having the database handle them. This is dependent on the server setup, but it's worth disabling to see if your performance improves.![]() |
| Site administration / ▶ Server / ▶ Session handling |
Pro-tips
Below are some additional tips that take a bit more effort, but provide additional benefits related to ensuring great performance for your Moodle site.Running multiple simultaneous manual course backups can sometimes cause problems. Avoid creating situations where many course backup / restores need to run at the same time. This is a common problem for the start of a new school term. Often instructors will be asked to duplicate their prior courses for the new term. Moodle doesn't provide any internal mechanism to queue backup requests so that they don't overwhelm your server. If enough instructors are doing this at the same time, it can make a Moodle site nearly unusable.
While all of these settings can be accessed from the Moodle interface, if you want to really make sure none of your site administrators accidentally sets one of these incorrectly, enter the desired value in your config.php file so that it cannot be enabled accidentally.
Consider starting with a clean install of Moodle once a year to have the smallest database footprint and ensure the best performance for your site.
Labels:
Moodle,
Moodle administration,
Moodle performance
Subscribe to:
Posts (Atom)




