[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

http://blogs.msdn.com/b/virtual_pc_guy/archive/2014/06/19/how-to-get-the-best-disk-performance-with-linux-on-hyper-v.aspx?cr_cc=200353267


please click vote if post helps you. can beneficial other community members reading thread.




Windows Server  >  Hyper-V



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file