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

Moodle performance vs. large courses

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 2.9.1
    • Caching, Performance
    • MOODLE_29_STABLE

      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

            Unassigned Unassigned
            callahan Harry Callahan
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.