Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix multi-worker performance related to dynamic scheduler scaling
As part of performance testing Wallaroo using multiple workers, @JONBRWN discovered a regression in both throughput and latency. He tracked the issue down the commit that re-enabled dynamic scheduler scaling (fc80968). NOTE: This performance issue did not exist for singler worker runs of Wallaroo. Some head scratching and testing led to the current commit to resolve the multi-worker performance issue. My best guess is that before this change the `steal` loop was dependent on a memory access to determine if dynamic scheduler scaling needed to suspend a thread or not as its initial check. This would lead to somewhat erratic behavior where some times the `steal` loop would take long while other times it wouldn't depending on how long the memory load took. This had a follow-on impact on actor execution because of ASIO messages because they wouldn't be picked up off of the queue for work as quickly as they could be due to the extra memory accesses. This commit changes the ordering of some operations to ensure that there is more consistent memory accesses for the loop resulting in more consistent actor actor execution for ASIO messages resolving the multi-worker performance issue that @JONBRWN discovered.
- Loading branch information