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

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

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.9.0, 3.2.11, 3.4.0-rc2
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage 2016-10-31

      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.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: