Created
February 2, 2021 10:42
-
-
Save dvanders/968d5862f227e0dd988eb5db8fbba203 to your computer and use it in GitHub Desktop.
ceph-iosched
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# prefer cfq (el7), then bfq (el8), then do nothing | |
if grep -q cfq /sys/block/sd*/queue/scheduler; then | |
# tune SSDs to use cfq scheduler and spinning disks to use cfq also | |
for DISK in /sys/block/sd*; do grep -q 0 ${DISK}/queue/rotational && echo cfq > ${DISK}/queue/scheduler; done | |
for DISK in /sys/block/sd*; do grep -q 1 ${DISK}/queue/rotational && echo cfq > ${DISK}/queue/scheduler; done | |
# tune cfq not to penalize writes when reading heavily | |
find /sys/block/sd*/queue/iosched/group_idle -exec sh -c 'echo 0 > {}' \; | |
find /sys/block/sd*/queue/iosched/slice_idle -exec sh -c 'echo 0 > {}' \; | |
find /sys/block/sd*/queue/iosched/quantum -exec sh -c 'echo 32 > {}' \; | |
elif grep -q bfq /sys/block/sd*/queue/scheduler; then | |
# tune everthing to use bfq | |
for DISK in /sys/block/sd*; do echo bfq > ${DISK}/queue/scheduler; done | |
else | |
echo Cannot find support io scheduler. | |
fi |
Still using bfq on all el8 osd servers?:)
yes we are. do you have a better suggestion?
Nope, we chose as well bfq. My question for double check for right choice. Thanks.
Seems cfq
has been gone in kernel 5. (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0e9da3fbf7d81f0f913b491c8de1ba7883d4f217)
Will you use bfq
or mq-deadline
instead?
bfq
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Still using bfq on all el8 osd servers?:)