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

MDL-49489 Causes severe performance degradation of course index and search pages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Deferred
    • Affects Version/s: 2.7.9
    • Fix Version/s: None
    • Component/s: Caching
    • Labels:
    • Environment:
      Moodle 2.7.9, Ubuntu, MySQL 5.6, PHP 5.5.9, cachstore_memcachecluster, 2 external servers with memcached
    • Database:
      MySQL
    • Testing Instructions:
      Hide
      1. Edit lib/coursecatlib.php, change CACHE_COURSE_CONTACTS_TTL to 1 second (so you don't have to keep waiting around)
      2. Create a new course
      3. On course/search.php search for that course so it shows up, should have no teachers listed
      4. Add a teacher
      5. Search again, the new teacher should be shown
      6. Add another teacher
      7. Search again, the new teacher should be shown
      8. Remove a teacher
      9. Search again, that teacher should disappear
      10. Remove the last teacher
      11. Search again, that teacher should disappear
      Show
      Edit lib/coursecatlib.php , change CACHE_COURSE_CONTACTS_TTL to 1 second (so you don't have to keep waiting around) Create a new course On course/search.php search for that course so it shows up, should have no teachers listed Add a teacher Search again, the new teacher should be shown Add another teacher Search again, the new teacher should be shown Remove a teacher Search again, that teacher should disappear Remove the last teacher Search again, that teacher should disappear
    • Affected Branches:
      MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      We have just upgraded from Moodle 2.6 to Moodle 2.7

      The change in MDL-49489 which changed a purge into a delete_many is causing us to have very slow page loads on the course index and course search pages (greater than 60 seconds) when the cache is cleaned.

      While this is affecting us on the memcachecluster plugin it will similarly affect the core memcache and memcached plugins.

      I imagine it is likely to affect 2.8 and greater as well, unless the way delete_many has been changed in them.

      On the search page we are getting an average of 18900 memcache deletes per page load taking on average 13,100 ms.

      On the course index page it is 12900 delete calls per page load taking on average 9,010 ms.

      The purge was actually quite fast for us.

        Attachments

        1. 8abd0d7b32423d3045ff3f5398d5e0cb6c8383c6.diff
          3 kB
          Skylar Kelty
        2. course-index-page.JPG
          37 kB
          Neill Magill
        3. course-search-page.JPG
          44 kB
          Neill Magill
        4. partial_stack_trace_of_slowness-index.jpg
          85 kB
          Neill Magill
        5. partial_stack_trace_of_slowness-search.jpg
          79 kB
          Neill Magill

          Issue Links

            Activity

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: