Download openATTIC Documentation Release 1.1.0 it
Transcript
openATTIC Documentation, Release 1.1.0
4.1.3 Scheduler
The disk scheduler’s job is to reorder IO requests before they’re sent to the storage system, which has a dramatic
impact on performance. Done right, it will reduce write latency; done wrong, it will wreak havoc. So, the scheduler
needs to be configured correctly.
1. If you’re using Hardware RAID, make sure the default scheduler is set to deadline. This can be verified
using the following command:
$ grep . /sys/class/block/sd?/queue/scheduler
/sys/class/block/sda/queue/scheduler:noop [deadline] cfq
/sys/class/block/sdb/queue/scheduler:noop [deadline] cfq
/sys/class/block/sdc/queue/scheduler:noop [deadline] cfq
If the CFQ scheduler is selected instead, edit /etc/default/grub, find the line that defines the
GRUB_CMDLINE_LINUX_DEFAULT variable, and make sure it contains the elevator=deadline option.
For example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet elevator=deadline"
Then run update-grub and reboot.
2. If you have SSDs, make sure their scheduler is set to noop.
3. For everything else, use cfq.
Switching schedulers for different devices can be achieved using a script like the following, for instance as a part of
/etc/rc.local:
# Set twraid schedulers to deadline
for disk in /dev/disk/by-id/scsi-3600050e?????????????????????????; do
sdx=$(basename ‘readlink $disk‘)
echo deadline > /sys/class/block/$sdx/queue/scheduler
done
# Set SSD schedulers to noop
for disk in /dev/disk/by-id/scsi-SATA_INTEL_SSD????????????????????????; do
sdx=$(basename ‘readlink $disk‘)
echo noop > /sys/class/block/$sdx/queue/scheduler
done
# Set 15k SAS disks’ schedulers to cfq
for disk in /dev/disk/by-id/{scsi-3500000e1????????,scsi-35000039?????????}; do
sdx=$(basename ‘readlink $disk‘)
echo cfq > /sys/class/block/$sdx/queue/scheduler
done
Note: When writing such a script, ensure that the wildcards only match the actual disks, and not any partitions on
them. So, just using /dev/disk/by-id/something* will usually not suffice.
4.2 Demo VMs
Integrate an openATTIC demo for virtualbox or vmware.
See also
4.2. Demo VMs
17