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

Improve performance information with session lock time

XMLWordPrintable

    • MOODLE_27_STABLE, MOODLE_36_STABLE
    • MDL-43568-master
    • Hide

      1. Install fresh Moodle 3.6 and turn on all debugging.

      Confirm on any page that there are no notices.

      2. In /admin/settings.php?section=debugging enable "Performance info".
      Confirm that the session lock wait time information is shown in footer, e.g.:

      Session lock wait time: 0.00206s
      

      3. In config.php , add

      define('MDL_PERFTOLOG'  , true);
      

      Confirm that session lock time information is shown in web server log file, e.g.

      [Fri Jul 13 12:00:30.099720 2018] [:error] [pid 296] [client 172.31.100.1:32850] PERF: /xxx/lib/ajax/service.php?sesskey=imur8uMJfY&info=core_fetch_notifications time: 0.010132s method: POST session_lock_wait_time: 0.00040s memory_total: 2958232B (2.8MB) memory_growth: 2559560B (2.4MB) memory_peak: 3891304B (3.7MB) includecount: 83 contextswithfilters: 0 filterscreated: 3 textsfiltered: 0 stringsfiltered: 0 langcountgetstring: 7 db reads/writes: 9/0 db queries time: 0.00102s ticks: 1 user: 1 sys: 0 cuser: 0 csys: 0 serverload: 1.25 Session (core\\session\\file): 2.8KB Caches used (hits/misses/sets): core/databasemeta {** static acceleration **(0/5/0) cachestore_file(5/0/0) } core/string {** static acceleration **(24/4/0) cachestore_file(4/0/0) } core/yuimodules {cachestore_file(3/0/0) } core/plugin_manager {cachestore_file(1/0/0) } . , referer: http://xxx/admin/settings.php?section=sessionhandling
      

      Show
      1. Install fresh Moodle 3.6 and turn on all debugging. Confirm on any page that there are no notices. 2. In /admin/settings.php?section=debugging enable "Performance info". Confirm that the session lock wait time information is shown in footer, e.g.: Session lock wait time: 0.00206s 3. In config.php , add define('MDL_PERFTOLOG' , true); Confirm that session lock time information is shown in web server log file, e.g. [Fri Jul 13 12:00:30.099720 2018] [:error] [pid 296] [client 172.31.100.1:32850] PERF: /xxx/lib/ajax/service.php?sesskey=imur8uMJfY&info=core_fetch_notifications time: 0.010132s method: POST session_lock_wait_time: 0.00040s memory_total: 2958232B (2.8MB) memory_growth: 2559560B (2.4MB) memory_peak: 3891304B (3.7MB) includecount: 83 contextswithfilters: 0 filterscreated: 3 textsfiltered: 0 stringsfiltered: 0 langcountgetstring: 7 db reads/writes: 9/0 db queries time: 0.00102s ticks: 1 user: 1 sys: 0 cuser: 0 csys: 0 serverload: 1.25 Session (core\\session\\file): 2.8KB Caches used (hits/misses/sets): core/databasemeta {** static acceleration **(0/5/0) cachestore_file(5/0/0) } core/string {** static acceleration **(24/4/0) cachestore_file(4/0/0) } core/yuimodules {cachestore_file(3/0/0) } core/plugin_manager {cachestore_file(1/0/0) } . , referer: http://xxx/admin/settings.php?section=sessionhandling

      It would be very useful to add to performance information the time it took to acquire a session lock. It would basically be a timer around

      \core\session\manager::start();
      

      in lib/setup.php.

      Ideally issues MDL-26254 and MDL-28214 should be resolved first.

            cyvanes Charles YVANES
            tmuras Tomasz Muras
            Peter Dias Peter Dias
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 minute
                1m

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