2.6.32 is Out! But a Word of Caution Around CFQ
Everyone loves a shiny new kernel. The latest one, 2.6.32, was released on Dec. 3 and there are some nice updates/fixes for file systems and IO in general. But there is a very important change for the CFQ IO scheduler that you need to understand.
2.6.32 CFQ Scheduler
New kernels are always exciting (in a good way). Lots of new features, fixes, and updates make it always exciting to build, install, and test, but please don’t do it on production systems. As part of the process of testing a new kernel it is always good to read about it first. A great place to start reading is the Kernel Newbie site.
Don’t let the name put you off – the site has some very good higher level summaries of the kernel. It talks about some of the major changes and additions or deletions, and also gives you some warning about changes. When reading the 2.6.32 summary I ran across a very interesting bit of information:
“In this release, the CFQ IO scheduler (the one used by default) gets a new feature that greatly helps to reduce the impact that a writer can have on the system interactiveness. The end result is that the desktop experience should be less impacted by background IO activity, but it can cause noticeable performance issues, so people who only cares about throughput (ie, servers) can try to turn it off echoing 0 to /sys/class/block//queue/iosched/low_latency. It’s worth mentioning that the ‘low_latency’ setting defaults to on.”
This is an important issue if you are planning to use or test the 2.6.32 kernel and are concerned about throughput performance.
In two previous articles, here and here, the CFQ (Completely Fair Queuing) IO scheduler was discussed. It is the default IO scheduler in the kernel at least for fairly recent distributions. In the 2.6.32 kernel there was a change to the CFQ default behavior to help improve interactiveness which is typically important for desktops and laptops or anything where something like media playback is important. However, this can have an impact on IO throughput performance. The author of CFQ, Jens Axboe, has a good discussion of the changes in an article on lwn.
This change could have a significant impact on performance for some workloads. Be sure to test both with and without this new “low latency” option to understand the impact on your workloads. In the meantime enjoy the shiny new kernel and watch out for the deluge of patches for 2.6.33.