-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
--rate mode: fix latency stats skew on low rates
Worker threads used sleep() in the bounded rate mode to avoid CPU hogging when polling on the event queue. The problem was that sleep() calls increased time spent by events in the queue, which is counted towards event latency to avoid the coordinated omission problem. The lower the rate, the bigger impact on latency was observed. The fix is replacing sleep()s with a condition variable which is now used to put worker into an idle wait when the queue is empty. The event generation thread now uses pthread_cond_signal() after each generated event to wake up an idle worker thread. Which somewhat increases sysbench CPU consumption, especially for high rates.
- Loading branch information
Showing
1 changed file
with
41 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters