Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-57338

Add slow lock tracing to folly::Synchronized

    XMLWordPrintable

Details

    • 0

    Description

      We are gradually replacing our use of manual locking / unlocking of objects used by multiple threads with folly::Synchronized. This is a superior solution to manual lock management in virtual all ways, however one downside is we do not have support for recoding slow mutex acquire or held durations, which we do have for manual locking (see TRACE_LOCKGUARD_TIMED, example usage.

      Such phosphor tracing is very useful when investigating performance issues, as we can see exactly when and on what thread a lock was contended. For example see MB-56891 or CBSE-14469 where this kind of lock tracing would have been very beneficial.

      Given our usage of folly::Synchorized is only increasing - and that means losing access to tracing some cases where we have it for manual locking, we should add support to tracing folly::Synchronized mutexes in the relative near-term.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            owend Daniel Owen
            drigby Dave Rigby (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty