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

Excessive CPU usage for idle tailable cursors

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.5.0
    • Internal Code
    • None
    • ALL

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: