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

Time and DB queries performance issue after landing MDL-71235

XMLWordPrintable

      The performance jobs started failing consistently. For instance: https://ci.moodle.org/job/P.00.00%20-%20Attic%20-%20Performance%20comparison%20moodle.git%20vs%20integration.git%20(master)/2320/console

      There is an increment on db queries and on time used:

       

      Summary (comparing normalized runs)
      between before - 400 (a5f0b354e7e weekl...) and after - 400 (e61f3796ddb Merge...)
      (Normalized) - increment: dbreads - All steps data combined -> 4.49% worse
      (Normalized) - increment: dbquerytime - View course -> 35.55% worse
      (Normalized) - increment: timeused - View course -> 34.61% worse
      

       

      After bisecting, the first bad commit points to MDL-71235:

       

      36bc7b07dbcb31a3c5292a27012eb12a85c10d72 is the first bad commit
      commit 36bc7b07dbcb31a3c5292a27012eb12a85c10d72
      Author: Dongsheng Cai <d@tux.im>
      Date: Tue Apr 20 20:41:53 2021 +1000
      MDL-71235 webservices: add activity completion data to web services
      

      After applying MDL-71235, these are the numbers I'm getting in my local instance with a Course M:

      • Time: 1.964736 secs
      • DB queries: 0.60742 secs
      • db reads/writes: 875/3

      And without this patch (so using the previous commit to this , e42ce0baeea5cc90e7512ee9cb95f9dbd50e332d) I'm getting:

      • Time: 1.097802 secs
      • DB queries: 0.22227 secs
      • db reads/writes: 565/1

       

            dongsheng Dongsheng Cai
            sarjona Sara Arjona (@sarjona)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h

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