Reduce CPU load in secondary_reads_unique_indexes.js test

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.0.1, 4.1.1
    • Affects Version/s: None
    • Component/s: Replication, Storage
    • None
    • Fully Compatible
    • v4.0
    • 4
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The secondary_reads_unique_indexes.js test starts up 16 reader threads, each using its own mongo shell process, and does multiple reads repeatedly. This can incur very high CPU usage on a machine. The high load appears to be generated primarily by the mongo shell processes, not the mongod nodes.

      For example, running this test on a 12 core Linux workstation nearly maxed out all cores when the reader threads were running. We should consider adding some short sleeps to these read loops in an attempt to make this test less intensive. This will reduce the likelihood of it locking up a machine when running with other tests concurrently.

            Assignee:
            Will Schultz
            Reporter:
            Will Schultz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: