Moodle icon indicating copy to clipboard operation
Moodle copied to clipboard

Research of Moodle cron performance improvement

Open SorraTheOrc opened this issue 7 years ago • 5 comments

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.

SorraTheOrc avatar Jan 29 '18 22:01 SorraTheOrc

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.

hosungsmsft avatar Apr 05 '18 16:04 hosungsmsft

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.

hosungsmsft avatar Apr 17 '18 22:04 hosungsmsft

This issue is put on hold for now. Dropping the milestone.

hosungsmsft avatar May 01 '18 23:05 hosungsmsft

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.

noveck avatar May 16 '18 14:05 noveck

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.

SorraTheOrc avatar May 16 '18 14:05 SorraTheOrc