Moodle
Moodle copied to clipboard
Research of Moodle cron performance improvement
Would it be better for cron to run in parallel using auto-scaling web tier?
Moodle supports cron running in parallel (there is built in locking) for micro tasks. It is recommended that cron runs at every 5 minutes but some tasks could take hours depending on situation so shouldn't cron also scale?
It's also worth noting that providing a bigger controller VM might not help since Moodle's Cron reportedly does not use more than one CPU core.
We recently learned that Catalyst IT EU presented their experiences with Cron Queue at MoodleMoot UK/Ireland 2018 (search for "Cron Queue" after clicking the link). They mentioned that they'll be releasing their plugin for the feature and I think we should utilize that as well.
Setting the milestone for this to be v1.5.1 for planning, can be adjusted as needed.
As we discussed over the call, the status of Catalyst EU's cron plugin is not yet ready and we are converting this issue into a generic research/recommendation work item.
This issue is put on hold for now. Dropping the milestone.
If cron performance is an issue, I'd suggest decoupling the moodlecron from the user facing web servers. An additional VM can be commissioned to deal specifically with integration/management which is outside of the webcluster. If this is deemed too complex, maybe repurpose the caching VM for double duty. Storage/Mem are pretty much the heavy hitters for caching, so the servers can be bumped up processing wise to manage the moodlecron.
We already have a separate controller VM on which cron workloads run. This issue doesn't exist because of an observed problem, rather it exists because of a concern raised by a user. To date this concern has not been supported by an actual problem.
Note there is no cache VM. When a cache is desired we use Redid provided as an Azure service. This reduces cost and management overhead.