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

Uneven distribution of yields are unfair

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.4
    • Component/s: Performance, Querying
    • None
    • Query Execution

      In some cases when expensive operations compete for resources (collection scan, ineffective index usage, etc), some queries may yield much more than others, producing slower results for those queries (which could have been avoided if yields had been distributed fairly among active operations).

      In one example, 41 reads competed with 1 write. The number of yields for the reads in-flight waiting for the write to complete were 16, 0, 0, 0, 0, 116, 19, 10, 0, 31, 23, 28, 1, 24, 13, 52, 10, 0, 94, 10, 11, 0, 23, 1, 26, 54, 24, 0, 22, 48, 19, 23, 28, 536, 3, 24, 0, 0, 27, 9. The query with 536 yields was no more complex than the others.

      This behavior can be especially noticeable, and produce cascades of timeouts or connections, when a socket/read timeout are set by the client. A better option than setting a client timeout is to support this on the server like with SERVER-2212, or the current $maxScan option.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            tad Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: