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

Lock 'timeAcquiringMicros' value is much higher than the actual time spent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.0.7, 3.2.0-rc2
    • Fix Version/s: 3.0.8, 3.2.0-rc3
    • Component/s: Concurrency
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      QuInt C (11/23/15)

      Description

      This is present both in 3.0 and in 3.2 (master), but not in 2.6 or earlier.

      For each wait which is more than a second, MongoDB will report the sum of arithmetic progression of all 500 msec increments of the wait, so basically we report approximately a square of the actual wait time.

      It happens on this line. For lock waits, we wake up every 500 milliseconds to check for deadlock and to also update the wait time counters so that if a thread is blocked for a long time, the currentOp statistics will reflect that. The bug is in that we do not reset the last sample timestamp and so the time keeps accumulating.

      The workaround until we fix it would be to take the square root of the wait time reported in the lock info.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: