[SERVER-10226] Excessive CPU usage for idle tailable cursors Created: 16/Jul/13 Updated: 13/May/15 Resolved: 16/Jul/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | 2.5.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Randolph Tan |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| 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. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 16/Jul/13 ] |
|
See |