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

backup/backuplib.php high load due to PHP5 issue

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7.2, 1.8, 1.9
    • Component/s: Backup
    • Labels:
      None
    • Environment:
      CentOS, latest yummy patches installed. PHP version 5.1.6. Moodle version 1.7 (may possibly be 1.7.1 - "1.7" is just what the dev guys said when I asked).
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      PHP5 introduced new code that "normalizes" paths for inlclude_once and require_once so Windoze systems can avoid case insensitivy problems. This code apparently ends up producing a lot of lstat64() calls as it 'normalizes' the directory paths. This happens very quickly, and would not normally be an issue. However, because of the repeated calls to include_once() within a loop, the end result (on my system at least) is that my sysload goes through the roof (6+) because of the repeated calls to lstat64().

      I have traced down the call in question to the file ./school/backup/backuplib.php and the loop begun on line 1772.

      I am requesting that someone figure out how to do what needs doing here without include_once()'ing fifty million times during backup.

      Thanks - and e-mail me if there is anything else I can do to help. My diagnosis has 'evolved' as I've been working on this, and may yet do so again - but the current situation as outlined above seems to be the final conclusion.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                30/Mar/07