Commit 08f8e62
committed
reactor: Disable hot polling if wakeup granularity is too high
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)1 parent 52ca3bf commit 08f8e62
1 file changed
+40
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3834 | 3834 | | |
3835 | 3835 | | |
3836 | 3836 | | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
3837 | 3861 | | |
3838 | 3862 | | |
3839 | 3863 | | |
| |||
4535 | 4559 | | |
4536 | 4560 | | |
4537 | 4561 | | |
| 4562 | + | |
| 4563 | + | |
| 4564 | + | |
| 4565 | + | |
| 4566 | + | |
| 4567 | + | |
| 4568 | + | |
| 4569 | + | |
| 4570 | + | |
| 4571 | + | |
| 4572 | + | |
| 4573 | + | |
| 4574 | + | |
| 4575 | + | |
| 4576 | + | |
| 4577 | + | |
4538 | 4578 | | |
4539 | 4579 | | |
4540 | 4580 | | |
| |||
0 commit comments