Tips for increase quiz performance

Tips for increase quiz performance

Eng Husam發表於
Number of replies: 12

Hello Dears 


I have an exam of 50 questions, 10 questions on each page. 600 students will take the exam in 3 periods, each period having 200 students. The server has 32 GB RAM, 8 CPU, and about 200 G storage. I increased all the limits in the config file in Apache.


What are your tips to avoid any slowness or problem during the exam? Are there settings in PHP file or  DB settings in the for the best performance?



Many thanks on advance 

評比平均分數: -
In reply to Eng Husam

Re: Tips for increase quiz performance

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
In a very rough formula circulating in the forums, 10-20 concurrent users per GB, 32 GB should stand the 200 exam candidates at a time easily. Provided that it is Linux and the installation and configuration is healthy. More in the documentation Performance and Performance FAQ. There is a dedicated forum, Hardware and performance dedicated to this topic.

A highly non-technical but neat trick is to set a long but easy password, like a sentence, restriction on the quiz. The different times the candidates need to type and re-type it flattens the peak. 眨眼
In reply to Visvanath Ratnaweera

Re: Tips for increase quiz performance

Eng Husam發表於
Thanks alot Dear for quickly response ،، my OS is windows server 2019 and moodle version is 4.2. All my questions is mutliple choice and i set exam password like number of 3 digits typing by teachers only
What do you mean about *installation and configuration is healthy. *??

It enough to prevent any interpretation?
In reply to Eng Husam

Re: Tips for increase quiz performance

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
To explain "healthy configurations" I use the handbrake analogy. The best engine is of no use if you drive with the handbrake pulled!

It doesn't have to be that extreme, sub-standard software and inexperienced system administrators can waste the energy of the best hardware.

Why are you so afraid of a crisis? Can't you run some kind of rehearsals? You don't always need the full load to come to a go-no-go type of an answer. You can monitor the machine as load ramps up and extrapolate to the expected load. Kind of stress-strain testing. Read the many discussions in the Hardware and performance forum.

If I knew you're using Windows, I wouldn't have joined the discussion. I use exclusively Linux.
In reply to Visvanath Ratnaweera

Re: Tips for increase quiz performance

Eng Husam發表於
Windows and Linux are brothers, 微笑 no problem. On the contrary, we are pleased with your comments.

I have read many discussions and many articles. I think we are ready and all thing are under control.

I did a MOC test , where about 100 users entered trail exam , and the RAM was not even affected by even 2 GB! and all thing is OK .

Some notes for benefit:

1. The questions are divided into 5 questions on each page
2. Delete all cache after each group
3. Do not start the exam at the same moment
4. The subject of the password to delay entry into the exam

Thanks again very much .
In reply to Eng Husam

Re: Tips for increase quiz performance [OT] Windows and Linux are brothers,

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
Hi

What you did all is sensible. Imagine, if a full dedicated machine couldn't support a peak of 200 users, that would be a shame.

What I don't understand: "2. Delete all cache after each group". Can you tell us exactly how your delete all the caches? I ask because caches are meant to get more and more efficient as they collect data. People call it "seeding". You force them to go back and start from the beginning.

[OT] Windows and Linux are brothers, 微笑

Noooh, not at all! (the smiley non-withstanding)

Firstly Bill Gates could be at best Linus Torvalds' uncle. Secondly Gates was the inventor of the concept of proprietary software whereas Linux is Free Software. (Watch the film "Revolution OS" circulates on the web.) True Gates was a genius, not in computing but in monetizing. And Microsoft's elbow bending of computer makers helped them to wipe out all the competition. You might remember how long he was the richest man in the world.

OK, one could be lenient considering all these years and his plus sides - mild mannered and statesmanlike - if not a disaster followed. His buddy or not, that gorilla who succeeded him, you might remember him dancing on stage, that guy called "Linux a cancer". And made enemies.

You are seeing one.
;-(
評比平均分數:Useful (2)
In reply to Visvanath Ratnaweera

Re: Tips for increase quiz performance [OT] Windows and Linux are brothers,

Eng Husam發表於
Praise be to God, everything went well with no significant problems except for some electrical problems for which we are not responsible, but two strange issues appeared::

First, some students tried to continue their attempts when the power went out, and the system did not save the answers -- they re-attempt
again.

Second, a password was set on the exam, but when we tried to enter it through the Safe Exam browser, we were unable to write it or write anything in place of the password -- password has been cancelled.


You seem to be quite a Linux fanatic. All are well :D
In reply to Eng Husam

Re: Tips for increase quiz performance

Emma Richardson發表於
Documentation writers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片
Separate out your questions to one per page...that will reduce the load ten fold right there...
In reply to Emma Richardson

Re: Tips for increase quiz performance

James Steerpike發表於
Particularly helpful Moodlers的相片
Is it always better to put every question on a separate page?
I am new to JMeter but what I am seeing is not much difference at low loads and running out of memory and quizzes failing to finish when questions are on individual pages.
Might be my setup but have other studies been done on this?
In reply to James Steerpike

Re: Tips for increase quiz performance

Emma Richardson發表於
Documentation writers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片
When a students submits a page with multiple questions, it stands to reason that it will take as many database operations as there are questions and so will increase the load. Not sure if it is mainly a database thing or it is affects memory etc. i am sure Tim can clarify more on that.
In reply to Emma Richardson

Re: Tips for increase quiz performance

James Steerpike發表於
Particularly helpful Moodlers的相片
I always thought a single page for all questions would be more efficient.
If I was doing a paper exam  with 10 questions and each student gave me the answer on a separate piece of paper, I would have much more work. I would have to find the student record, add one result before jumping to a new student record. However, if each student took 10 seconds for each question, I would start recording student answers after 10s with each question on one page rather than wait 100 seconds for the first result. When the last question is given to me, I could either have 90% of the exam already marked or have dozens of unprocessed answers on my desk.
How does the analogy hold up? The page containing questions in Moodle is displayed and the selection of multiple choice answers is handled by the student browser. The server only processes the page when the "next" button is pressed. I think breaking up one page into 10 separate question pages is going to be a lot more work for the server as it has to render and process 10 pages instead of one.
So how do you compare the two approaches? I have been using JMeter and adapting the script from https://github.com/YU-MITC/jmeter-quiz-testplan. The plan loads 1000 users and I have set up a 10 question multi-choice test, either single page or one question per page. I don't understand all the test plan but have managed to get it to run threads on  the two tests. For the single page, the submission is delayed by 100 seconds with a standard deviation of 20 seconds ie 68 out of 100 will finish between 80 and 120 seconds, 95% between 60 and 140 seconds. For the single question per page, the wait time is 10 and 2 seconds per question.
I pushed it to failure with a 1000 threads each representing a different user logging in, completing the quiz and logging out. For the single page quiz, 16 had no quiz result and completion times of from under a minute to 3 min 20s. For one question per page, 148 did not complete and completion times ranged from nearly 7 to 11 minutes.
I may have completely misunderstood the way quizzes are handled and my results may reflect the JMeter setup rather than reality but I would question if breaking up a quiz pages is always a good idea.