Documentation_block_switching-sched

Chinese translated version of Documentation/switching-sched


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: biyu tang<tangbiyu17@qq.com>
---------------------------------------------------------------------
Documentation/block_switching-sched的中文翻译


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


中文版维护者: 唐碧瑜  biyu tang<tangbiyu17@qq.com>
中文版翻译者: 唐碧瑜  biyu tang<tangbiyu17@qq.com>
中文版校译者: 唐碧瑜  biyu tang<tangbiyu17@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.

在开机的时候为了选择IO调度器,使用参数'elevator=deadline'.也可以使用'noop' 和
'cfq'(默认的)。IO调度器只有在开机的时候才能被全局分配。

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:

每个IO队列都有一套与它相关的IO调度器可调参数。这些可调参数控制IO调度器如何
工作。你可以找到这些入口在:

/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:

假设你在/sys上安装了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).

在Linux 2.6.10内核,在一个给定的块上现在有可能改变IO调度器(例如,为默认的系
统设置CFQ调度,通过给定使用期限或者无操作调度设置一个特殊的设备从而可以提高设备
的吞吐量。)

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).

SCHEDNAME就是被定义的IO调度器的名字,DEV就是设备名字(hda, hdb, sga,或者你碰巧有的)

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:

只要简单的输入"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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值