CPU Spike For One Time only when launch an exam

CPU Spike For One Time only when launch an exam

by hakim hairon -
Number of replies: 6

Hi Experts !

I got some question on usage of moodle. Right now we implement moodle with AWS environment and do some usage testing with online exam. by referring graph below, you can see CPU spike too high in short time. the online exam start at 2.30PM-4.30PM. i just want to verify is this a normal behavior on moodle ? is CPU usually spike higher when initially launch an exam?



Additional information :

  • moodle v3.8.2
  • PHP 7.3
Average of ratings: -
In reply to hakim hairon

Re: CPU Spike For One Time only when launch an exam

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What was the online exam? What were students doing and how many of them? If this was a large number of students (relative to size of hardware) all starting a quiz at the same time then it's expected.
In reply to Howard Miller

Re: CPU Spike For One Time only when launch an exam

by hakim hairon -
the online exam is like an objective question (choose A, B, C, and D) and fill in the blank questions.

At the same time, students also download the question paper for who have an essay test.

The total number of students is 1800 where the moodle is running with multiple server to support the workload

So the spike is usual behavior ?
In reply to hakim hairon

Re: CPU Spike For One Time only when launch an exam

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Yes, generally an on-line MC exam with the quiz activity is a demanding application, especially at the beginning when everybody fetch the exam at the same time. Submitting the exam is not that demanding, since the candidates tend to stagger. If your sever can manage 1800 candidates, it is quite strong. Read something about it in the other thread Redis VS Memcache. There is a dedicated forum for this topic, the Hardware and performance forum. Read as much as possible in that forum.

P.S. If you have further question on this topic, you might want to request the moderator to move this discussion to the Hard. & Perf. forum.
In reply to Visvanath Ratnaweera

Re: CPU Spike For One Time only when launch an exam

by hakim hairon -
great explanation. thank you sir!
In reply to hakim hairon

Re: CPU Spike For One Time only when launch an exam

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
In a sense synchronous exams behave the same, whether in-person or remote: Big stress at the beginning, less at the end. Little happens in between - just recording the unsaved answers, when the candidates turn pages, for example.

Back to your graph, the peak goes above 80%. What does that mean? Is it a sign that the next time the server will reach its limits? You should know. If it is a concern, there is no single answer to what needs to be done. The documentation of the Hard. & perf. forum is your starting point and its past discussions build an unconventional knowledge base.
In reply to Howard Miller

Re: CPU Spike For One Time only when launch an exam

by Giovanni Vosloo -
Howard does have a point. Just showing CPU % does not show much at all. If this is some 1 core CPU then it will go wind at anything being done, so more information is needed to know if you have performance issues.

Content plays a big role as well, so if you have videos in the exam, then definitely it will use the server more than text.