免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1005 | 回复: 0
打印 上一主题 下一主题

Linux kernel 2.6 - I/O scheduler [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-10-27 12:56 |只看该作者 |倒序浏览
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 mergingmerges two adjacent requests to one request* Elevatororders 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 "Prevent 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 schedulersNoop schedulerThe noop scheduler implements only the request merging function.Deadline schedulerThe 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".
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/86696/showart_2079671.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP