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

Cache $CFG on disk

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.0
    • None
    • CentOS6, Apache 2, PHP 5.3.5, Oracle 10g
    • Oracle
    • MOODLE_20_STABLE

    Description

      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/

      Attachments

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

        Issue Links

          Activity

            People

              moodle.com Moodle HQ
              mazzolal Luca Mazzola
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: