Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Red Hat Enterprise Linux 5 > Issue <<  280 of 346 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 12750
Last update: 05-16-08
Issue:
Can I change the I/O scheduler for a particular disk without the system rebooting?
Resolution:

As of Red Hat Enterprise Linux 5, it is possible to change the I/O scheduler for a given block device on the fly. This makes it possible to set the CFQ scheduler as the system default. It is recommended to set the device to use the anticipatory or noop schedulers, which can improve throughput.

To set a specific scheduler, simply do this:

echo SCHEDNAME > /sys/block/DEV/queue/scheduler

where SCHEDNAME is the name of a defined I/O scheduler, and DEV is the device name (hda, hdb, sda ...)

The list of defined schedulers can be found by simply doing a cat /sys/block/DEV/queue/scheduler. The list of valid names will be displayed with the selected scheduler in brackets:

# cat /sys/block/hda/queue/scheduler
noop anticipatory deadline [cfq]
# echo anticipatory > /sys/block/hda/queue/scheduler
# cat /sys/block/hda/queue/scheduler
noop [anticipatory] deadline cfq

Adding the line “echo SCHEDNAME > /sys/block/DEV/queue/scheduler into the file /etc/rc.local will enable the I/O scheduler to be set on the next system booting.

For more detail information about I/O scheduler can be found at /usr/share/doc/kernel-x.x.x/Documentation/block.


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Red Hat Enterprise Linux 5 > Issue <<   280  of  346  >>