Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-82358

Reduce the synchronization cost of `LockedClientsCursor`

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Service Arch
    • Fully Compatible
    • v7.3, v7.2, v7.1, v7.0, v6.0, v5.0
    • Service Arch 2024-03-18, Service Arch 2024-04-01, Service Arch 2024-04-15
    • 170

      This primary targets serverStatus, and more specifically the FTDC thread running this command to collect metrics on active operations. Today, every invocation of serverStatus needs to exclusively lock the ServiceContext, and then iterate through the list of Client objects, individually lock them (using a spin-lock), and check their associated OperationContext. Under heavy-load, and if either of these locks is contended, this may result in stalls in collecting metrics.

      The idea is to either bound the time spent waiting to acquire the ServiceContext mutex, or redesign the synchronization primitive (e.g. partition it) to make it more scalable / less susceptible to contentions during operation spikes.

            Assignee:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Reporter:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: