Travel

Categories

Use NOOP I/O Scheduler for virtualized Linux guest with kernel 2.6 guest on vmware

Refer to http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2011861

  • The scheduler can be set for each hard disk unit. To check which scheduler is being used for particular drive, run this command:

    cat /sys/block/disk/queue/scheduler

    For example, to check the current I/O scheduler for sda:

    # cat /sys/block/sda/queue/scheduler
    [noop] anticipatory deadline cfq

    In this example, the sda drive scheduler is set to NOOP.

  • To change the scheduler on a running system, run this command:

    # echo scheduler > /sys/block/disk/queue/scheduler

    For example, to set the sda I/O scheduler to NOOP:

    # echo noop > /sys/block/sda/queue/scheduler

    Note: This command will not change the scheduler permanently. The scheduler will be reset to the default on reboot. To make the system use a specific scheduler by default, add an elevator parameter to the default kernel entry in the GRUB boot loader menu.lst file.

    For example, to make NOOP the default scheduler for the system, the /boot/grub/menu.lst kernel entry would look like this:

    title CentOS (2.6.18-128.4.1.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-128.4.1.el5 ro root=/dev/VolGroup00/LogVol00 elevator=noop
    initrd /initrd-2.6.18-128.4.1.el5.img

    With the elevator parameter in place, the system will set the I/O scheduler to the one specified on every boot.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>