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

Excessive CPU usage for idle tailable cursors

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.5.0
    • Component/s: Internal Code
    • None
    • ALL

      Tailing a capped collection with await_data is sometimes recommended as a simple pub / sub system. But if no documents are being inserted into the collection, each tailable cursor checks for new documents every 2ms. In my system, this means that 10 subscribers spin the CPU at 36%.

      A better solution would be a condition variable per collection that is notified when documents are inserted.

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: