Path: blob/master/Documentation/block/switching-sched.txt
10821 views
To choose IO schedulers at boot time, use the argument 'elevator=deadline'.1'noop', 'as' and 'cfq' (the default) are also available. IO schedulers are2assigned globally at boot time only presently.34Each io queue has a set of io scheduler tunables associated with it. These5tunables control how the io scheduler works. You can find these entries6in:78/sys/block/<device>/queue/iosched910assuming that you have sysfs mounted on /sys. If you don't have sysfs mounted,11you can do so by typing:1213# mount none /sys -t sysfs1415As of the Linux 2.6.10 kernel, it is now possible to change the16IO scheduler for a given block device on the fly (thus making it possible,17for instance, to set the CFQ scheduler for the system default, but18set a specific device to use the deadline or noop schedulers - which19can improve that device's throughput).2021To set a specific scheduler, simply do this:2223echo SCHEDNAME > /sys/block/DEV/queue/scheduler2425where SCHEDNAME is the name of a defined IO scheduler, and DEV is the26device name (hda, hdb, sga, or whatever you happen to have).2728The list of defined schedulers can be found by simply doing29a "cat /sys/block/DEV/queue/scheduler" - the list of valid names30will be displayed, with the currently selected scheduler in brackets:3132# cat /sys/block/hda/queue/scheduler33noop deadline [cfq]34# echo deadline > /sys/block/hda/queue/scheduler35# cat /sys/block/hda/queue/scheduler36noop [deadline] cfq373839