Improve CPU usage in tests with IO threads #823
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.