T086学习网 | 站长学院 | 技术文档 | 成语 | 歇后语 | 帝国时代 | 代码收藏 | IP地址查询 | 生活百科 | 生日密码 | CSS压缩 | 用户评论 | 欣欣百宝箱

2.6内核改变系统IO调度算法

【 网络 更新时间:2010-04-04 | 字体:
[导读]2.6内核的四种调度算法 In the 2.6 kernel series, there are four interchangeable schedulers, as follows: cfq- “Completely Fair Queuing” makes a good default for most workloads on general-pur...

2.6内核的四种调度算法

In the 2.6 kernel series, there are four interchangeable schedulers, as follows:

cfq- “Completely Fair Queuing” makes a good default for most workloads on general-purpose servers. 

as – “Anticipatory Scheduler” is best for workstations and other systems with slow, single-spindle storage.

deadline – “Deadline” is a relatively simple scheduler which tries to minimize I/O latency by re-ordering requests to improve performance. Deadline的I/O调度器,在数据吞吐量非常大的数据库系统中表现得更有优势。

noop- “NOOP” is the most simple scheduler of all, and is really just a single FIFO queue.

修改默认的IO调度算法

There are two ways to change the I/O scheduler – at boot time, or with new kernels at runtime. For all Linux kernels, appending ‘elevator={noop|deadline}’ to the kernel boot string sets the I/O elevator.

With GRUB, append the string to the end of the kernel command:

title Fedora Core (2.6.9-5.0.3.EL_lustre.1.4.2custom)
root (hd0,0)
kernel /vmlinuz-2.6.9-5.0.3.EL_lustre.1.4.2custom ro
root=/dev/VolGroup00/LogVol00 rhgb noapic quiet elevator=deadline

With newer Linux kernels (Red Hat Enterprise Linux v3 Update 3 does not have this feature. It is present in the main Linux tree as of 2.6.15), one can change the scheduler while running. If the file /sys/block/<DEVICE>/queue/scheduler exists (where DEVICE is the block device you wish to affect), it will contain a list of available schedulers and can be used to switch the schedulers.

(sda is the <disk>):

[root@cfs2]# cat /sys/block/sda/queue/scheduler
noop [anticipatory] deadline cfq
[root@cfs2 ~]# echo deadline > /sys/block/sda/queue/scheduler
[root@cfs2 ~]# cat /sys/block/sda/queue/scheduler
noop anticipatory [deadline] cfq

The other schedulers (anticipatory and cfq) are better suited for desktop use.

查看当前的IO调度算法

dmesg | grep -i schedular

英文信息copy from lustre manual

  • 转载请注明来源:IT学习网 网址:http://www.t086.com/ 向您的朋友推荐此文章
  • 特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系我们,我们会尽快予以更正。
更多
留言建议ASP探针PHP探针站长Enjoy的Blog
© 2017 T086学习网 - T086.com(原itlearner.com)
RunTime:8.27ms QueryTime:7