Is there a maximum number of activities & resources in any single Moodle course above which performance drops significantly?
In other words, once a course reaches X number of activities & resources, should the course be then divided into multiple courses?
Our Moodle system generally runs quickly However, when trying to access activities (especially quizzes and assignments) in either of two large courses the activities take a long time to load, sometimes as long as 2 or 3 minutes. However when accessing activities in smaller courses in the same system pages load very quickly.
The System Engineer running our server has informed us that we should consider dividing up the two large courses into multiple courses since Moodle is unable to handle so many activities and resources in any one course. i.e he's saying it's a moodle 'limitation' and not a hardware problem.
So, is there a limit (or ideal max or optimal number) on the number of activities & resources in any one course?
The two large courses in question are running consecutively on the following Moodle:
The two of the courses each contain a total of 599 activities and resources:
Databases 1 (with 4473 entries)
Resources (links and web pages) 154
The two courses are fully online with no classroom component. The total number of students per course is 270, but the maximum number of concurrent users is about 30, and perhaps 60 near weekly deadlines. The slow loading of pages happens even when there are only a few students accessing the courses.
The Moodle set up is as follows:
- Rack servers, 5 x CPU AMD Opteron 2.1GHz / Memory 8GB
Any advice or suggestions will be greatly appreciated.
In our Moodle 1.9 system we have a course with 1102 activities. There are also another three courses with over 500 activities.
I just had a quick look at one of the more 'normal' courses from this set (it isn't a current one though) and it seems to perform absolutely fine.
In these examples, none of the activities are quizzes or assignments, so I don't know if there is a particular problem with those.
The main consequences of a large number of activities in one course should be:
- Reduced performance when editing activity settings (when you do this, it rebuilds the course cache for all activities on the course).
- Increased size of modinfo cache in database (course table) and in memory when processing a request
- Reduced performance when displaying course view page and possibly some activitypages if 'jump' dropdown present.
Without looking at the code, off the top of my head it seems like all of these should be proportional to N (number of activities) not N squared or anything, so it shouldn't really matter how many activities you have within reason.
I would suggest:
1) Turn on performance info in footer (you can probably do this temporarily on your live system, if you don't mind students maybe seeing it). Is it making an unreasonable number of queries when you go to one of the 'problem' pages compared to an equivalent page (quiz or assignment) in another course?
2) If so, backup/restore this course onto a test system and make sure you can verify the problem, then turn on the database debugging option in config.php, I forget the name, but where it prints out every database query. Go and look at a problem page. This should reveal what queries are being made (loads) and you can probably guess what code area they come from.
Thank you very much for your comments and suggestions.
> - Reduced performance when editing activity settings
> - Reduced performance when displaying course view page and possibly some activity pages if 'jump' dropdown present.
Yes, we are definitely experiencing these two things.
We will follow your suggestions, and I suspect we may have to rationalize the course contents by combining many of the activities, especially the quizzes.