LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 736|回复: 4

各位的内核起动elevator用的是什么?

[复制链接]
发表于 2005-5-10 16:59:40 | 显示全部楼层 |阅读模式
kernel2.6.10 发现起动内核时用elevator=deadline,不如用默认的时候起动kde和其他程序快。各位都用的是什么?好象一共有四个io参数?有什么区别?
 楼主| 发表于 2005-5-10 17:17:12 | 显示全部楼层
这里找到一篇  http://awlinux1.alphaworks.ibm.c ... d_ioScheduler.shtml

Linux kernel 2.6 - I/O scheduler
The I/O scheduler optimizes disk access. Issuing each request directly to the disk results in a bad throughput, because this strategy would cause a high amount of small requests, where in the worst case each request demands a completely different disk area. Today data transfer rates from physical disks are very high, so transfer times are very short. The dominating part of the access time is the disk latency, mainly caused by disk head movements of about 8 ms in average. The strategy for optimization aims at minimizing the number of I/O operations and disk head movements.

I/O schedulers mostly implement two functions:

    *

      Request merging
      merges two adjacent requests to one request
    * Elevator
      orders the requests to minimize seek times considering the physical data location (seek time is the duration of a head movement to reach an addressed sector). A "revent starvation" functionality is required, which ensures that requests which are not in the 'seek reducing' order are served in an adequate time frame. Here the various I/O schedulers have different strategies.

Available I/O schedulers

    Noop scheduler
        The noop scheduler implements only the request merging function.
    Deadline scheduler
        The deadline scheduler implements request merging, the elevator and in addition tries to prevent request starvation (which can be caused by the elevator algorithm) by introducing a deadline for each request. In addition, it prefers readers. Linux does not delay write processes until their data are really written to the disk, because it caches the data, while readers have to wait until their data are available.
    Anticipatory scheduler ("as scheduler")
        The anticipatory scheduler implements request merging, the elevator and in addition optimizes for physical disks by avoiding too many head movements. It tries to solve situations where many write requests are interrupted by a few read requests. After a read operation it waits for a certain time frame for another read and doesn't switch back immediately to write requests. This scheduler is not intended to use for storage servers!
    Complete fair queuing scheduler ("cfq scheduler")
        The complete fair queuing scheduler implements request merging, the elevator and in addition embarks on the strategy to allow all users of a particular drive about the same number of I/O requests over a given time.


Defaults

The default in the kernel 2.6 is the anticipatory scheduler. A Novell/SUSE SLES 9 installation overwrites this with the "cfq scheduler".
回复 支持 反对

使用道具 举报

发表于 2005-5-10 17:27:40 | 显示全部楼层
默认的anticipatory,据说deadline这个IO调度比较适合运行数据库。

/usr/src/linux/Documentation/block/as-iosched.txt

/usr/src/linux/Documentation/block/deadline-iosched.txt

这是内核文档,但只有其中两种。

cat /sys/block/hda/queue/scheduler 查看当前所用的IO调度。

echo "iosched-name" > /sys/block/hda/queue/scheduler 运行时进行改变。
回复 支持 反对

使用道具 举报

发表于 2005-5-10 23:00:08 | 显示全部楼层
嗯,我的fc3默认是cfq。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-11 10:31:32 | 显示全部楼层
谢谢楼上两位,我现在用as的那个,感觉比deadline快,回头我试试cfq的那个

ps:有看了一下文档,as好象是适合很多写操作,读操作少的那种应用?cfq是平均的?e文不好不知道看的对不对
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表