Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2955

Add statistics tracking the amount of time threads spend waiting for high level locks

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.9.0, 3.2.11, 3.4.0-rc2
    • Labels:
      None
    • Sprint:
      Storage 2016-10-31

      Description

      Add statistics tracking the amount of time threads spend waiting for the dhandle list lock and possibly other high level locks in WiredTiger.

      Specific lock acquire counts might also be interesting. The full set of locks I think are worth considering are:

      • Checkpoint lock (WT_CONNECTION::checkpoint_lock)
      • Handle list lock (WT_CONNECTION::dhandle_lock)
      • Metadata lock (WT_CONNECTION::metadata_lock)
      • Schema lock (WT_CONNECTION::schema_lock)
      • Table lock (WT_CONNECTION::table_lock)

      I'm inclined to add a pair of statistics for each lock type, similar to:

          LockStat('lock_dhandle_count', 'Number of times handle lock was acquired'),
          LockStat('lock_dhandle_wait_time', 'Amount of time waiting to acquire handle lock'),
      

      It would also be interesting to distinguish between internal and application threads, but that would lead to a lot of new statistics.

      These statistics would be gathered as part of fast statistics, though we want to be careful re: adding gettime calls around lock acquisition. If these locks are acquired regularly it may be worthwhile not gathering the stats for performance reasons.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keith.bostic Keith Bostic
                Reporter:
                alexander.gorrod Alexander Gorrod
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: