Skip to content

Instantly share code, notes, and snippets.

View clwluvw's full-sized avatar

Seena Fallah clwluvw

View GitHub Profile
@dvanders
dvanders / ceph-iosched
Last active March 25, 2025 07:51
ceph-iosched
#!/bin/sh
# prefer cfq (el7), then mq-deadline (el8), then do nothing
if grep -q cfq /sys/block/sd*/queue/scheduler; then
# tune SSDs to use noop scheduler and spinning disks to use cfq
for DISK in /sys/block/sd*; do grep -q 0 ${DISK}/queue/rotational && echo noop > ${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