Documentation\block\switching-sched.txt

来源:互联网 发布:四川广电电视网络套餐 编辑:程序博客网 时间:2024/04/30 08:43

Chinese translated version of Documentation\block\switching-sched.txt

If you have any comment or update to the content, please contact the
original document maintainer directly.  However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help.  Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.

Chinese maintainer: 赵晶  anana53@qq.com
---------------------------------------------------------------------
Documentation\block\switching-sched.txt 的中文翻译

如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。

中文版维护者: 赵晶  anana53@qq.com
中文版翻译者: 赵晶  anana53@qq.com
中文版校译者: 赵晶  anana53@qq.com

以下为正文
---------------------------------------------------------------------
To choose IO schedulers at boot time, use the argument 'elevator=deadline'.
'noop' and 'cfq' (the default) are also available. IO schedulers are assigned
globally at boot time only presently.

Each io queue has a set of io scheduler tunables associated with it. These
tunables control how the io scheduler works. You can find these entries
in:

/sys/block/<device>/queue/iosched

assuming that you have sysfs mounted on /sys. If you don't have sysfs mounted,
you can do so by typing:

# mount none /sys -t sysfs

在启动时选择IO调度程序,使用参数“elevator=deadline”。
“noop”和“cfq”(默认)也可。IO调度器
目前在全球只在开机的时候分配。
每个IO队列有一套可与它相关的IO调度。这些
可调的控制着IO调度如何工作。你可以找到这些条目
在:
/sys/block/<device>/queue/iosched
假设你已经安装在sysfs /系统。如果你还没有安装sysfs,
您可以通过键入:
# mount none /sys -t sysfs

As of the Linux 2.6.10 kernel, it is now possible to change the
IO scheduler for a given block device on the fly (thus making it possible,
for instance, to set the CFQ scheduler for the system default, but
set a specific device to use the deadline or noop schedulers - which
can improve that device's throughput).

To set a specific scheduler, simply do this:

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

where SCHEDNAME is the name of a defined IO scheduler, and DEV is the
device name (hda, hdb, sga, or whatever you happen to have).

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 currently selected scheduler in brackets:

在Linux 2.6.10内核,现在有可能改变
IO调度,通过一个在空中给定的块设备(使它成为可能,
例如,为系统的默认值设置一个CFQ调度,但
设置一个特定的设备去使用最后期限或无操作的调度,
这个可以提高设备的吞吐量)。

设置一个具体的调度,只要这样做:

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

schedname是一个定义的IO调度的名字,DEV是
设备名称(hda, hdb, sga, 或者任何你碰到的)。

定义的调度列表可以通过命令
"cat /sys/block/DEV/queue/scheduler"来找到,有效名称列表
将被显示,随着当前已选择的调度,在括号内:

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

原创粉丝点击