[Forum FAQ] How to set NOOP I/O scheduler for Linux Virtual Machines on Hyper-V
as know, there 4 i/o schedulers linux kernel reorder requests different algorithms:
- noop scheduler
- anticipatory i/o scheduler (as)
- deadline scheduler
- complete fair queuing scheduler (cfq)
it recommended use noop scheduler linux virtual machines on hyper-v obtain better i/o performance. in article, introduce how turn on noop i/o scheduler linux virtual machines on hyper-v , can follow steps below:
1. check current-selected i/o scheduler
a. switch root account
switching root account necessary many tasks in linux root user account set aside administrative access. can access command line on linux virtual machine , enter su or su root switch root account. (figure 1)
figure 1.
b. confirm currently-selected i/o scheduler
the name of file controls scheduler block device is:
/sys/block/device-name/queue/scheduler
assuming have disk named /dev/sda, can use command below view contents of virtual file , show currently-selected scheduler surrounded square brackets:
# cat /sys/block/sda/queue/scheduler
from figure 2, can see current i/o schedule cfq.
figure 2.
2. set i/o scheduler noop
in general, can use following command set specific scheduler:
#echo schedname > /sys/block/device-name/queue/scheduler
since want set i/o scheduler noop, can use command below:
#echo noop > sys/block/sda/queue/scheduler (figure 3)
figure 3.
3. edit boot loader's configuration , restart
to add noop scheduler boot loader’s configuration, can add “evevator=noop” to kernel parameters in the /etc/grub.conf. (figure 4)
figure 4.
after steps above, can see current-selected i/o scheduler noop. (figure 5)
figure 5.
note: after finish step 2, can find current i/o scheduler changed noop. recommend following steps 3 in case setting changes after reboot.
more information:
best practices running linux on hyper-v
http://technet.microsoft.com/en-us/library/dn720239.aspx
how best disk performance linux on hyper-v
please click vote if post helps you. can beneficial other community members reading thread.
Windows Server > Hyper-V
Comments
Post a Comment