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

output of "top" command is zero on secondary running WT

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 3.0.0-rc7
    • Affects Version/s: 3.0.0-rc6
    • Component/s: Diagnostics
    • None
    • Fully Compatible
    • ALL

      first start a replset running wiredtiger

      var x = new ReplSetTest({nodes:3})
      x.startSet({storageEngine:"wiredTiger"})
      x.initiate()
      

      then put some load on the primary

      while (1) { x.getPrimary().getDB('test').test.insert({}); }
      

      compare the output of the top command on the primary and the secondary. the total time on the namespace being written to increases on the primary, but never changes on the secondary.

      testReplSet:PRIMARY> before=db.runCommand("top").totals["test.test"].total.time; sleep(1000); after=db.runCommand("top").totals["test.test"].total.time;print(after-before)
      170816
      
      ...
      
      testReplSet:SECONDARY> before=db.runCommand("top").totals["test.test"].total.time; sleep(1000); after=db.runCommand("top").totals["test.test"].total.time;print(after-before)
      0
      

      it does behave correctly if you use mmapv1 instead though:

      testReplSet:PRIMARY> before=db.runCommand("top").totals["test.test"].total.time; sleep(1000); after=db.runCommand("top").totals["test.test"].total.time;print(after-before)
      135118
      ...
      testReplSet:SECONDARY> before=db.runCommand("top").totals["test.test"].total.time; sleep(1000); after=db.runCommand("top").totals["test.test"].total.time;print(after-before)
      75982
      

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            mikeo@mongodb.com Michael O'Brien
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: