To change the I/O scheduler on the host and the KVM instance and set an I/O weight, perform the following steps:
- On the host OS, list the I/O scheduler currently in use, substituting the block device with whatever is appropriate for your system:
root@kvm:~# cat /sys/block/sda/queue/schedulernoop deadline [cfq]root@kvm:~#
- Change the I/O scheduler on demand and ensure it is in use by running:
root@kvm:~# echo deadline > /sys/block/sda/queue/schedulerroot@kvm:~# cat /sys/block/sda/queue/schedulernoop [deadline] cfqroot@kvm:~#
- To make the change persistent across server restarts, add the following line to the GRUB default configuration and update:
root@kvm:~# echo 'GRUB_CMDLINE_LINUX="elevator=deadline"' >> /etc/default/grub ...