![Page 1: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/1.jpg)
How to improve Moodle performance
David Monllaó@DavidMonllao
MoodleMoot Australia 2015 #mootau15
the world’s open source learning platform
![Page 2: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/2.jpg)
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
![Page 3: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/3.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
![Page 4: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/4.jpg)
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/
![Page 5: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/5.jpg)
the world’s open source learning platform
If you are a Moodle administrator...● Performance overview report
![Page 6: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/6.jpg)
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...
![Page 7: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/7.jpg)
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
![Page 8: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/8.jpg)
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
![Page 9: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/9.jpg)
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
?!¿?¡¿?
![Page 10: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/10.jpg)
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
![Page 11: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/11.jpg)
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)
![Page 12: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/12.jpg)
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
![Page 13: How to improve your Moodle site performance.pdf](https://reader034.vdocuments.us/reader034/viewer/2022050800/587f22ae1a28ab98408bb869/html5/thumbnails/13.jpg)
Thank you
Community: moodle.orgCommercial: moodle.com
@moodle
the world’s open source learning platform