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

Provide global database-aggregated latency stats

    XMLWordPrintable

Details

    • Improvement
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • Diagnostics

    Description

      The global latency stats Server Status section currently aggregates all the latency information known to the server.
      We have a need for the same information except aggregated by database.

      For example, today we have:

      db.serverStatus().opLatencies
      {
      	"reads" : {
      		"latency" : NumberLong(9404373),
      		"ops" : NumberLong(90552)
      	},
      	"writes" : {
      		"latency" : NumberLong(4846358),
      		"ops" : NumberLong(22579)
      	},
      	"commands" : {
      		"latency" : NumberLong(8227275),
      		"ops" : NumberLong(108682)
      	},
      	"transactions" : {
      		"latency" : NumberLong(0),
      		"ops" : NumberLong(0)
      	}
      }
      

      I'm hoping to get a response like this, probably using an aggregation stage like $collStats:

      use admin
      db.system.aggregate( [ { $globalLatencyStats: { latencyStats: { } } } ] );
      {[{    "db" : "firstdb",
      	"reads" : {
      		"latency" : NumberLong(9404373),
      		"ops" : NumberLong(90552)
      	},
      	"writes" : {
      		"latency" : NumberLong(4846358),
      		"ops" : NumberLong(22579)
      	},
      	"commands" : {
      		"latency" : NumberLong(8227275),
      		"ops" : NumberLong(108682)
      	},
      	"transactions" : {
      		"latency" : NumberLong(0),
      		"ops" : NumberLong(0)
      	}},
         {    "db" : "seconddb",
      	"reads" : {
      		"latency" : NumberLong(9404373),
      		"ops" : NumberLong(90552)
      	},
      	"writes" : {
      (etc...)
      
      

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: