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

Multiple tailable cursors against the same collection shows high cpu usage on server

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.3
    • Component/s: Performance
    • Labels:
      None
    • ALL
    • Hide

      install node.js
      npm install -g mubsub

      Code
      ---------------------------------------
      var mubsub = require('mubsub');

      var client = mubsub('mongodb://localhost:27017/test?poolSize=5',

      {safe: true}

      );
      var channel = client.channel('mubsub');

      channel.subscribe(console.log);
      channel.subscribe(console.log);
      channel.subscribe(console.log);
      channel.subscribe(console.log);
      channel.subscribe(console.log);
      channel.subscribe(console.log);
      channel.subscribe(console.log);
      channel.subscribe(console.log);
      channel.subscribe(console.log);

      Show
      install node.js npm install -g mubsub Code --------------------------------------- var mubsub = require('mubsub'); var client = mubsub('mongodb://localhost:27017/test?poolSize=5', {safe: true} ); var channel = client.channel('mubsub'); channel.subscribe(console.log); channel.subscribe(console.log); channel.subscribe(console.log); channel.subscribe(console.log); channel.subscribe(console.log); channel.subscribe(console.log); channel.subscribe(console.log); channel.subscribe(console.log); channel.subscribe(console.log);
    • 0

      Open multiple tailable cursors with or without awaitdata against a capped collection causes sustained high cpu (on my machine about 30% cpu). A single cursor is about 5% cpu.

      Confirmed using the node.js driver and java driver.

            Votes:
            24 Vote for this issue
            Watchers:
            30 Start watching this issue

              Created:
              Updated:
              Resolved: