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

Improve 3.11 Activity information performance

    XMLWordPrintable

Details

    • MOODLE_311_STABLE
    • MOODLE_311_STABLE
    • MDL-71899-311-2
    • MDL-71899-master-2
    • Hide

      Environment:

      1. Two clean install instances (master branch). With and without the patch.
      2. Turn on the Performance debug display for each instance.
      3. A Test course M (Using tool_generator) on each instance.
      4. Edit the created Test course M and upload a course image (Can use the large image in the attachment).
      5. A student account that enrolled to the created Test course M (Or use the created one by Generator if you remember the password) on each instance.

      Example command for Generator:

       

      php admin/tool/generator/cli/maketestcourse.php --shortname=C1 --fullname="Course 1" --size="M"

       

      Example config for Performance debug display:

       

      $CFG->debug = (E_ALL | E_STRICT); // DEBUG_DEVELOPER
      $CFG->debugdisplay = 1;
      $CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
      $CFG->perfdebug = 15;
      $CFG->debugpageinfo = 1;

       

      Part 1 - Get the performance result (Execute on each instance)

      1. Navigate to the instance home page. Ex: http://localhost/m/stable_master/
      2. Click on the Login link on the top right.
      3. Fill in the student username and password but do not click on the Log in button yet.
      4. Purge the cache using this command: php admin/cli/purge_caches.php
      5. Click the Log in button.
      6. Note the Performance debug display as below:
        • Name: Login submission. 
        • DB reads/writes
        • DB queries time
        • Time used (This one do not have a label, it is the value with secs right under the Data retention summary link)
      7. Click on Site home.
      8. Purge the cache using this command: php admin/cli/purge_caches.php
      9. Click on the Test course M that was created before.
      10. Note the Performance debug display as below:
        • Name: Course viewing
        • DB reads/writes
        • DB queries time
        • Time used (This one do not have a label, it is the value with secs right under the Data retention summary link)

      Part 2 - Compare the value

      1. Verify that the Login submission DB reads value of the instance with Patch is lower than the instance without Patch.
      2. Verify that the Course viewing DB reads value of the instance with Patch is lower than the instance without Patch.
      Show
      Environment: Two clean install instances (master branch). With and without the patch. Turn on the Performance debug display for each instance. A Test course M (Using tool_generator) on each instance. Edit the created Test course M and upload a course image (Can use the large image in the attachment). A student account that enrolled to the created Test course M (Or use the created one by Generator if you remember the password) on each instance. Example command for Generator:   php admin/tool/generator/cli/maketestcourse.php --shortname=C1 --fullname= "Course 1" --size= "M"   Example config for Performance debug display:   $CFG->debug = (E_ALL | E_STRICT); // DEBUG_DEVELOPER $CFG->debugdisplay = 1 ; $CFG->debugstringids = 1 ; // Add strings=1 to url to get string ids. $CFG->perfdebug = 15 ; $CFG->debugpageinfo = 1 ;   Part 1 - Get the performance result (Execute on each instance) Navigate to the instance home page. Ex: http://localhost/m/stable_master/ Click on the Login link on the top right. Fill in the student username and password but do not click on the Log in button yet. Purge the cache using this command: php admin/cli/purge_caches.php Click the Log in button. Note the Performance debug display as below: Name: Login submission.  DB reads/writes DB queries time Time used (This one do not have a label, it is the value with secs right under the Data retention summary link) Click on Site home. Purge the cache using this command: php admin/cli/purge_caches.php Click on the Test course M that was created before. Note the Performance debug display as below: Name: Course viewing DB reads/writes DB queries time Time used (This one do not have a label, it is the value with secs right under the Data retention summary link) Part 2 - Compare the value Verify that the Login submission DB reads value of the instance with Patch is lower than the instance without Patch. Verify that the Course viewing DB reads value of the instance with Patch is lower than the instance without Patch.
    • 0
    • HQ Team International Sprint 3, HQ Team International Sprint 4, HQ Team International Sprint 5, HQ Team International Sprint 6, HQ Team International Sprint 7, HQ Team International Sprint 8

    Description

      During the code freeze for 3.11, some performance errors were raised (MDL-71464MDL-71505)
      This issue is created to improve the Activity information performance.

      Attachments

        Issue Links

          Activity

            People

              huongn@moodle.com Huong Nguyen
              huongn@moodle.com Huong Nguyen
              Shamim Rezaie Shamim Rezaie
              Jun Pataleta Jun Pataleta
              Carlos Escobedo Carlos Escobedo
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona), Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              7 Vote for this issue
              Watchers:
              23 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                13/Sep/21

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 3 days, 1 hour
                  1w 3d 1h