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

Moodle performance vs. large courses

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.9.1
    • Fix Version/s: None
    • Component/s: Caching, Performance
    • Labels:
    • Affected Branches:
      MOODLE_29_STABLE

      Description

      Hi,

      My moodle platform contains very large courses (900 sections and 5000 modules on average). Course caching takes a while (several minutes and several thousand of database queries). On any course modification, the cache is rebuild.

      I increase the values of MAX_MODINFO_CACHE_SIZE and CONTEXT_CACHE_MAX_SIZE to limit the amount of database queries:

      // config.php
      define('MAX_MODINFO_CACHE_SIZE', INF);
      define('CONTEXT_CACHE_MAX_SIZE', INF);
      

      But there is still costly repeated database queries on all pages, when I used section options :

      $section_info->{option_name};
      

      # ...
      SELECT id,name,value FROM mdl_course_format_options WHERE courseid = '206' AND format = '...' AND sectionid = '2202'
      SELECT id,name,value FROM mdl_course_format_options WHERE courseid = '206' AND format = '...' AND sectionid = '2207'
      SELECT id,name,value FROM mdl_course_format_options WHERE courseid = '206' AND format = '...' AND sectionid = '2212'
      SELECT id,name,value FROM mdl_course_format_options WHERE courseid = '206' AND format = '...' AND sectionid = '2216'
      # ...
      

      or when I want to get user-depended data :

      get_fast_modinfo($course, $user);
      

      How to improve the cache performance and how to limit the amount of repeated database queries?

      My configuration :

      • Moodle: 2.9 (Build: 20150511)
      • Database: MariaDB Galera Cluster
      • Cache stores: Memcached server for application and session caches

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              callahan Harry Callahan
              Participants:
              Component watchers:
              Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated: