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

Cache $CFG on disk

XMLWordPrintable

    • Oracle
    • MOODLE_20_STABLE

      When there is a big installation with many frontends and a single DBMS server (even if it is a cluster) the most critical factor we observed for the scalability of the system is the number of requests done (in reading mode) to the table

      {prefix}config: almost every page requires to include these information.

      So, based on the availability of a local filesystem area on each front-end (web server Apache), we developed a slight modification of the code to store in a local file the JSON representation of the actual configuration settings (the main modification is in the file lib/setuplib.php : lines 588-677 of attached code).

      The modification could be activate trough the usage of a subfield of the dboption property in the CFG object, created starting by the config.php file.

      The modification also includes a small change in a single file of admin directory (admin/settings.php : lines 39-44), in order to flush this cache when data is saved in the {prefix}

      config.

      Our modifications are based on the 2.0.1 versione of the code, but should be possible to apply it to almost all the version of Moodle available, as far as I have the possibility to check (maybe on 2.2 should be checked, I haven't done it, right now).

      We tested it with Oracle 10g, but maybe could laso help with other DBMS, and it seems to us it improves quite a lot the speed-up for page loading, even on a single server...

      Hope this could help, regards from the staff of eLab at USI/SUPSI - Switzerland http://www.elearninglab.org/

        1. setuplib.php
          47 kB
        2. settings.php
          5 kB
        3. config.php
          0.8 kB

            moodle.com Moodle HQ
            mazzolal Luca Mazzola
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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