Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9722

collStats histogram shows operations taking 38-76 hours

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None

    Description

      https://docs.mongodb.com/master/reference/operator/aggregation/collStats/#latencystats-document

        { micros: NumberLong(137438953472), count: NumberLong(1000) },
        { micros: NumberLong(274877906944), count: NumberLong(100) }
      

      and

      1000 operations in the range (68719476736, 137438953472], and
      100 operations in the range (137438953472, 274877906944].
      

      137438953472 microseconds = 38 hours
      274877906944 microseconds = 78 hours

      I'm not sure where these numbers were generated but it takes considerable effort to generate an optimized query that takes this long to complete.

      Here is an example document from a quick test I ran if we would like to use these values instead.

      {
      	"ns" : "test.foo",
      	"localTime" : ISODate("2017-01-04T23:05:27.655Z"),
      	"latencyStats" : {
      		"reads" : {
      			"histogram" : [
      				{
      					"micros" : NumberLong(0),
      					"count" : NumberLong(1)
      				},
      				{
      					"micros" : NumberLong(8),
      					"count" : NumberLong(63523)
      				},
      				{
      					"micros" : NumberLong(16),
      					"count" : NumberLong(2204)
      				},
      				{
      					"micros" : NumberLong(32),
      					"count" : NumberLong(173)
      				},
      				{
      					"micros" : NumberLong(64),
      					"count" : NumberLong(9)
      				},
      				{
      					"micros" : NumberLong(256),
      					"count" : NumberLong(1)
      				}
      			],
      			"latency" : NumberLong(711472),
      			"ops" : NumberLong(65911)
      		},
      		"writes" : {
      			"histogram" : [
      				{
      					"micros" : NumberLong(0),
      					"count" : NumberLong(2)
      				},
      				{
      					"micros" : NumberLong(2),
      					"count" : NumberLong(2)
      				},
      				{
      					"micros" : NumberLong(8),
      					"count" : NumberLong(55375)
      				},
      				{
      					"micros" : NumberLong(16),
      					"count" : NumberLong(137587)
      				},
      				{
      					"micros" : NumberLong(32),
      					"count" : NumberLong(4278)
      				},
      				{
      					"micros" : NumberLong(64),
      					"count" : NumberLong(227)
      				},
      				{
      					"micros" : NumberLong(128),
      					"count" : NumberLong(84)
      				},
      				{
      					"micros" : NumberLong(256),
      					"count" : NumberLong(1)
      				},
      				{
      					"micros" : NumberLong(512),
      					"count" : NumberLong(3)
      				},
      				{
      					"micros" : NumberLong(1024),
      					"count" : NumberLong(126)
      				},
      				{
      					"micros" : NumberLong(2048),
      					"count" : NumberLong(3)
      				},
      				{
      					"micros" : NumberLong(3072),
      					"count" : NumberLong(1)
      				},
      				{
      					"micros" : NumberLong(4096),
      					"count" : NumberLong(6)
      				},
      				{
      					"micros" : NumberLong(6144),
      					"count" : NumberLong(4)
      				},
      				{
      					"micros" : NumberLong(8192),
      					"count" : NumberLong(15)
      				},
      				{
      					"micros" : NumberLong(12288),
      					"count" : NumberLong(6)
      				},
      				{
      					"micros" : NumberLong(16384),
      					"count" : NumberLong(1)
      				},
      				{
      					"micros" : NumberLong(49152),
      					"count" : NumberLong(1)
      				}
      			],
      			"latency" : NumberLong(4327980),
      			"ops" : NumberLong(197722)
      		},
      		"commands" : {
      			"histogram" : [ ],
      			"latency" : NumberLong(0),
      			"ops" : NumberLong(0)
      		}
      	}
      }
      

      Attachments

        Activity

          People

            allison.moore@mongodb.com Allison Reinheimer Moore
            kevin.arhelger@mongodb.com Kevin Arhelger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 5 weeks, 6 days ago