Upload
vuongcong
View
242
Download
0
Embed Size (px)
Citation preview
How to improve Moodle performance
David Monllaó@DavidMonllao
MoodleMoot Australia 2015 #mootau15
the world’s open source learning platform
the world’s open source learning platform
Why my Moodle may be slow?
Because it needs time to be as
awesome as it is.https://commons.wikimedia.org/wiki/File:Florida_Box_Turtle_Digon3a.jpg
the world’s open source learning platform
What can you change if you are a...
1. Teacher Moodle course
2. Moodle administrator Moodle site
3. System administrator Servers
4. Developer Code
5. Moodle HQ Releases
the world’s open source learning platform
If you are a teacher try to...● Enable just the filters you think are really necessary
● Resize your images before uploading them
● Reduce number of sections or paginate them
● Remove recent activity block
● Disable features you and your students do not use
● Ask your Moodle administrator :)http://www.wallpapersnewhd.com/mario-wallpaper-hd-free-download/
the world’s open source learning platform
If you are a Moodle administrator...● Performance overview report
the world’s open source learning platform
● Disable log legacy data
● Reduce number of courses on frontpage (or use Dashboard)
● Moodle features that might affect performance○ Enabled filters○ Event monitor○ Grade history
● Use slash arguments (web cache)
● Ask your sys admin :)
If you are a Moodle administrator...
the world’s open source learning platform
If you are a system administrator...
● Memcached
○ For caches
○ For session data
● Opcache for opcode caching (PHP 5.5 onwards)○ https://docs.moodle.org/29/en/OPcache
the world’s open source learning platform
If you are a system administrator...Compare performance:
● Cache stores config
● Sessions to database, to file, to memcached?
● Hardware, network
https://github.com/moodlehq/moodle-performance-comparison
the world’s open source learning platform
If you are a system administrator...● Hardware, clusters, NAS, proxy caching, Apache & database tuning…
○ You know better than me, find other sysadmins and talk with them
○ https://docs.moodle.org/29/en/Performance_recommendations
?!¿?¡¿?
the world’s open source learning platform
If you are a developer...● Database queries
○ Reduce db writes and db reads as much as possible■ Avoid queries inside loops (design ready to fetch “IN ()”)
○ Always join using indexed fields○ For big data set processing use get_recordset* + recordset_walk○ Add cache definitions when necessary
● Code profiling○ XHProf
● For global changes○ moodle-performance-comparison
the world’s open source learning platform
If you are Moodle HQ...● Ensure no performance regressions are introduced -> http://goo.gl/yp14bO
● Look for performance issues and more caches -> e.g. MDL-48448
● Expand performance test coverage (work in progress)
Questions or more information
Trackerhttps://tracker.moodle.org
Hardware and performance forum https://moodle.org/mod/forum/view.php?id=596
David Monllaó[email protected]
the world’s open source learning platform
Thank you
Community: moodle.orgCommercial: moodle.com
@moodle
the world’s open source learning platform