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

Need to expose better timing information in currentOps

    Details

    • Backport Completed:

      Description

      Currently MongoDB internally tracks things at microsecond granularity, yet exports such as currentOp only show "secs_running", making web level latencies all rounded down to zero.

      It may make sense to provide highly accurate elapsed data (as "secs" is already derived from it), and easiest way is probably just by having a separate counter as msecs (or usecs, if need be for a 64bit value).

      The change is minimal yet the value for systems administrator is relatively large:

      diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
      index 2b74983..01d78ec 100644
      — a/src/mongo/db/curop.cpp
      +++ b/src/mongo/db/curop.cpp
      @@ -219,6 +219,7 @@ namespace mongo {

      if( a )

      { b.append("secs_running", elapsedSeconds() ); + b.append("msecs_running", elapsedMillis() ); }

      b.append( "op" , opToString( _op ) );

        Issue Links

          Activity

          Hide
          domas Domas Mituzas added a comment -

          http://p.defau.lt/?HMHhgsW1Wn75P7d_VKHPig has a bit nicer formatting for this huge patch

          Show
          domas Domas Mituzas added a comment - http://p.defau.lt/?HMHhgsW1Wn75P7d_VKHPig has a bit nicer formatting for this huge patch
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

          Message: SERVER-13368: Expose microsecs_running in currentOp
          Branch: master
          https://github.com/mongodb/mongo/commit/9dc581691ba4b7fbd84fbb985a4ab826c02abd4d

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'} Message: SERVER-13368 : Expose microsecs_running in currentOp Branch: master https://github.com/mongodb/mongo/commit/9dc581691ba4b7fbd84fbb985a4ab826c02abd4d
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

          Message: SERVER-13368: Expose microsecs_running in currentOp
          (cherry picked from commit 9dc581691ba4b7fbd84fbb985a4ab826c02abd4d)
          Branch: v2.6
          https://github.com/mongodb/mongo/commit/68ae4983b197cf853ae3367a95a03a4946141115

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'} Message: SERVER-13368 : Expose microsecs_running in currentOp (cherry picked from commit 9dc581691ba4b7fbd84fbb985a4ab826c02abd4d) Branch: v2.6 https://github.com/mongodb/mongo/commit/68ae4983b197cf853ae3367a95a03a4946141115

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: