Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-66199

Bad performance starting second attempt at quiz containing 100+ random questions from a large question bank

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.5.7, 3.6.5, 3.7.1
    • Fix Version/s: None
    • Component/s: Performance, Quiz
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE

      Description

      Course details :

      • Question bank of around 7500 MCQs in a single category
      • Multiple quizzes across 3 different courses are generated using random questions from the same common question bank
      • Each quiz has 100 ~ 150 questions (Random)
      • Answer choice shuffling is on
      • Users can attempt each quiz multiple times

      Issue Details :

      • When a student opens a new quiz for the first attempt, it takes less than 3 seconds to get generated
      • When the student completes the first attempt and re-attempts the same quiz, it takes up to 120 ~ 150 seconds to get generated
      • Issue occurs in 3.5, 3.6 & 3.7
      • Issue occurs for regular users (Student) and not for admin users
      • Issue can be replicated very predictably

      Installation details :

      • Google GCP, VM - Intel Xeon 2 GHZ, 2 Cores, 7.5 GB RAM, 50 GB SSD Persistent Disk, Ubuntu 18 OS updated with all latest patches
      • Moodle 3.5.7 (Issue persists even when upgraded to 3.6 & 3.7)
      • MariaDB database
      • Server meets all requirements during Moodle installation
      • Server is used only for Moodle Installation

      Other info:

      • Purging caches and rebooting the entire server does not help
      • Webmin system dashboard shows CPU utilization at 95% ~ 100% when the quiz is being generated. (With only one active student user at that time, however, this means the issue affects other simultaneous users if there are any.)
      • Issue affects only Student users (whose score history is maintained in the system.)
      • Issue does not occur when admin user attempts the quiz. (Probably since quiz is generated in 'Preview mode'.)
      • Issue occurs across all the three courses where the same Questions bank is used
      • Tried upgrading to 3.6 and 3.7, same issue is replicated

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sangee Sanjay G
              Participants:
              Component watchers:
              Matteo Scaramuccia, Jake Dallimore, Jun Pataleta, Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: