Chinaunix首页 | 论坛 | 博客
  • 博客访问: 227490
  • 博文数量: 45
  • 博客积分: 2095
  • 博客等级: 大尉
  • 技术积分: 430
  • 用 户 组: 普通用户
  • 注册时间: 2005-03-29 11:32
文章存档

2011年(2)

2010年(1)

2009年(1)

2008年(5)

2007年(1)

2006年(16)

2005年(19)

我的朋友

分类: LINUX

2010-03-10 11:24:43

事实上我在想,既然Anticipatory Scheduler对于某些特定的应用有那么大的提高,它还是有它存在的价值的,我们完全可以以module的方式来保持它,这样对于特殊应用,我们可以已优化目的来应用它。


不过QoS概念的引入也算不错的进步,虽然做不到那么好。。。


2.6.33 Anticipatory Scheduler

As mentioned in a previous article a great place to start learning about new features of the latest kernels is site. Kernel newbies has a nice review of the latest kernel, . There are a few things around storage that I want to point out.

The biggest thing is that the anticipatory IO scheduler. In a I did a quick glance at the IO schedulers in the kernel. One of them is called the Anticipartory Scheduler that anticipates subsequent block requests and caches them for use. Putting on your storage expert hat one can see that the anticipatory scheduler works really well for certain workloads. For example it has been that the Apache web server may achieve up to 71% more throughput using the anticipatory IO scheduler. On the other hand, it has been that the anticipatory scheduler has caused up to a 15% slowdown on a database run.

So the anticipatory IO schduler was a mixed bag overall, helping some workloads and hurting others. In the 2.6.33 kernel, Linus decided that the CFQ (Completely Fair Queue) Scheduler had a broad range of capabilities beyond the desktop to include servers, so the anticipatory scheduler was from the 2.6.33 kernel.

If you were using the anticipatory controller be sure to do some testing with the CFQ scheduler on the 2.6.33 kernel before rolling it out in production.

Block IO Controller

Many people may be aware of the ability to “throttle” network bandwidth or assign priorities to network traffic. This can be used to allocate resources to various applications to ensure that they have some sort of Quality of Service (QoS). But there isn’t really anything similar for IO.

In the new 2.6.33 kernel, there was a new IO controller added. The allows the creation of proportional-weight time division of disk policy using the CFQ IO scheduler. A short but reasonable introduction to it is and the commit for the controller is listed .

What the Block IO Controller allows you to do is have better control over how much IO bandwidth (performance) various applications within the CFQ Scheduler can have. However, I think it will be a while until people have a feel for how the Block IO Controller interacts with the CFQ IO Scheduler. In the meantime keep an eye out for people experimenting with controller.


The block I/O controller

I/O bandwidth allocation and control is a tricky problem; as was discussed here earlier this year, several groups have tried to solve this problem at different levels in the block I/O stack. At a minisummit in Tokyo, the developers behind various I/O controllers got together and decided on a multi-level approach to the problem. Since then, developer Vivek Goyal has remarked:

IO control is a huge problem and the moment we start addressing all the issues in one patchset, it bloats to unmanageable proportions and then nothing gets inside the kernel. So at io mini summit we agreed that lets take small steps and once a piece of code is inside the kernel and stabilized, take the next step. So this is the first step.

This first small step is implementing a proportional-weight I/O controller within the CFQ I/O scheduler. A new control group (cgroup) class (called "blkio") is created, with each group given an I/O weight between 100 and 1000. The available I/O bandwidth is then handed out to groups as determined by their configured weight.

Working within CFQ gives the I/O controller fine-grained control over how much bandwidth each group gets. On the other hand, CFQ is poorly positioned to identify block I/O traffic which is not directly generated by user space (writeback, for example) or to throttle activity at the virtual memory level. Achieving that will require the integration of a controller which hooks into the system at a much higher level. The plan is to write such a controller and have it work transparently within the same blkio cgroup. But a couple more small steps will probably be required before that is ready to go in.

详情可看Documentation/cgroups/blkio-controller.txt


阅读(2162) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-12-15 11:34:35

感谢你提供的信息, 我在linux kernel development 3 上看到还有anticipatory I/O scheduler, 没有找到相关代码, 2.6.33 就没有了, 作者 Robert Love 有点粗心呀!