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

Perf: count() inconsistent response times

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major - P3 Major - P3
    • None
    • 1.6.2
    • Performance
    • None
    • EC2
    • ALL

    Description

      Problem:
      Depending on moderate load (see attach munin report), I'm seeing inconsistent time for count()

      Mon Sep 6 15:45:33
      > db.blogs.count()
      169096641
      Mon Sep 6 15:54:22

      Mon Sep 6 19:06:20
      > db.blogs.count()
      170166577
      Mon Sep 6 19:06:29

      The second clocks in a 9 seconds (when there is no load on the system), the first at 9 minutes with a system under moderate load.

      I'm guessing that the count is a computed value rather than stored. If we use a stored value in future, then insert and delete operations will be gated by the latch time for the counter, so its a trade off.

      Environment:

      • 3 shard cluster, 2 members per shard, plus a config and router node (all separate machines)

      Reproduce:
      See steps above

      Business Case:
      Scalability

      Attachments

        1. Munin.pdf
          6.00 MB

        Activity

          People

            Unassigned Unassigned
            alvin Alvin Richards (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: