Skip to content

reactor: Disable hot polling if wakeup granularity is too high #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

StephanDollberg
Copy link
Member

Downstream scylladb#2715

We are seeing an issue where rand write performance under performs
massively (100x).

This is caused by the linux dio kernel thread/workqueue being starved
and hence aio write completitions aren't being served in a timely
manner.

This doesn't happen using "default" linux settings but only if
`/proc/sys/kernel/sched_wakeup_granularity_ns` or
(`/sys/kernel/debug/sched/wakeup_granularity_ns` on newer kernels) is
raised.

Specifically this effect can be observed on RHEL-8 as the `tuned`
version that ships with it sets this value to 15000000 but can
reproduced on any other system by just bumping that value.

This patch tries to detect this being the case and if so it will warn
and disable hot polling (both `--poll-aio` and `--idle-poll-time-us`)
which gives back the majority of the performance.

Note because this setting has moved to debug fs on newer kernels which
requires root rights to read it's actually not very likely that we will
be able to detect it on these. However, RHEL8 uses an older kernel and
is likely the major offender to run into this bug (we have had multiple
customers run into this).

Ref scylladb#2696

(cherry picked from commit 099cf61)
@StephanDollberg StephanDollberg force-pushed the stephan/downstream-rhel8-252 branch from ed0c56d to 08f8e62 Compare April 15, 2025 08:24
@StephanDollberg StephanDollberg merged commit f520be4 into v25.2.x-pre Apr 15, 2025
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants