Quiz autosaving of STACK based quizzes

Quiz autosaving of STACK based quizzes

by Stuart Anderson -
Number of replies: 3

We have just come out of our exam period where we ran one campus based STACK based exam with all the students (~270) starting at the same time and most ending at the same time.

We experienced a number of performance issues which we are working through - mostly when all students hit begin at the start and submit at the end.

During the exam, a number of students complained of receiving autosave error messages (like this https://docs.moodle.org/311/en/Using_Quiz#/media/File:Quiz_disconnect.png).  I'm trying to understand the behaviour of autosaving during STACK exams. Our autosave timing is set to every 1 minute.  I see that the autosave behaviour is partly implemented here: https://github.com/moodle/moodle/blob/master/mod/quiz/yui/src/autosave/js/autosave.js, but this relates to timing triggers on the TINYMCE editor. STACK quizzes use simple HTML input fields for capturing student responses.

Can anyone shed light on the autosave behaviour within STACK questions?  For example, is the autosave timing defaulting only to the master setting of every 1 minute (default period) OR is there some randomisation introduced to ensure all the student's browsers are not synced to autosave at the same time every minute thoughout the exam?

Our server monitoring showed moderate-low CPU stress during the exam (but very high peaks at start and end).  I do not know if there were any local network issues at the time, but I have no evidence for it.

Any insights or advice appreciated.

Thanks,

Stuart

Average of ratings: -
In reply to Stuart Anderson

Re: Quiz autosaving of STACK based quizzes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
autosave.js handles all input types. It is just that for most input types the required code is very simple. There is lots of code relating to TinyMCE because getting the data out of that is hard!

To get a better idea what is going on, try setting Debugging to Developer level, and then have your Browser's developer console open while you experiement with the quiz. You should find that autosave outputs information about what it is doing.

Note that Autosave only does something after a student has changed an answer. That provides the necessary randomisation to spread the load.

Alos, don't just look at CPU on the web servers. You also need ot look at the database server, and you should also look at RAM use and Disc IO at least.

This plugin is one way to slighly ransomise the start times: https://moodle.org/plugins/quizaccess_delayed. You might find that helps. (Start and end of the whole quiz is a particularly high load moment, particularly with STACK. Also, would be nice to do MDL-68806 one day, so attempts can be created and graded asynchronously.
In reply to Tim Hunt

Re: Quiz autosaving of STACK based quizzes

by Stuart Anderson -
Thanks Tim. I've up voted the enhancement request you linked to. The plugin is also something we might consider, if it fits in with our exam delivery model.

Regarding monitoring our server, we are monitoring many server parameters (CPU, memory, traffic, threads, etc) with PTRG network monitor on all through of our servers (moodle, MariaDB and Maxima). We need to do further work on both our load testing design and then tweaking the server testings for performance. We saw high load on the moodle and maxia servers, but the DB was generally fine.

Thanks,

Stuart
In reply to Stuart Anderson

Re: Quiz autosaving of STACK based quizzes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If the DB is not the bottleneck, then you can scale by adding more moodle and Maxima servers - if you can affort the hardware.