Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve CPU usage in tests with IO threads (#823)
Currently, when running tests with IO threads, we set the `events-per-io-thread` config to 0. This activated IO threads 100% of the time, regardless of the number of IO events. This is causing issues with tests running multiple server instances, as it drained machine CPU resources. As a result, tests could have very long runtimes, especially on limited instances. For example, in https://github.com/valkey-io/valkey/actions/runs/10066315827/job/27827426986?pr=804, the `Cluster consistency during live resharding` test ran for 1 hour and 41 minutes. This PR addresses the issue by: 1. Deactivating IO threads when there are no IO events 2. Continuing to offload all IO events to IO threads Tested on 16 cores instance, after implementing these changes, the runtime for the `Cluster consistency during live resharding` test dropped from 7 minutes an 14 seconds to 3 minutes and 28 seconds. Signed-off-by: Uri Yagelnik <[email protected]>
- Loading branch information