CFQ may not be the right choice of i/o scheduler for the most common desktop systems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Ubuntu currently uses the kernel default i/o scheduler, CFQ. I strongly believe that this is the wrong scheduler to use for the vast majority of likely Ubuntu desktop installs because it causes huge lag in interactive applications under the heavy kind of i/o typically experienced during a file copy or backup operation.
DISCLAIMER: Of course it's always hard to justify these sorts of claims because desktop responsiveness is a notoriously woolly and hard to measure thing, but without at least suggesting some solutions I don't see how we can improve it, hence this bug report.
With that said, I would politely request that the Ubuntu kernel team at least examine the performance, and very importantly, the general desktop responsiveness experienced when using a variety of different i/o schedulers. I also think this could go a long way to solving bug no. 131094 , especially since numerous users in that bug thread have reported significant improvements in responsiveness after changing i/o schedulers.
To reproduce on a standard ubuntu desktop, open (for example) a music player, firefox and/or any other slightly latency sensitive ui applications. Now execute:
sudo dd if=/dev/
where $ROOTPARTITION is your root partition eg sda1, hdb2 or whatever. This should simulate the heavy i/o likely to be experienced whilst doing a large file copy/backup or similar. Now go back to normal web browsing/email writing/whatever and observe some truly horrible ui lag and general unresponsiveness.
The current i/o scheduler for a particular partition can be changed on the fly by editing /sys/block/
Try changing the i/o scheduler for your root partition to "deadline" for example and repeat the test. I observed MASSIVELY improved ui responsiveness during the heavy i/o test on my desktop, and several others who I have discussed this with have seen similar improvements. Now I'm certainly NOT saying "switch to the deadline i/o scheduler", but I do think the ubuntu kernel devs should experiment a bit and see if perhaps the current i/o scheduler is not the best option for desktop responsiveness. After all, a scheduler that copes well with the typical tasks a server has to deal with may not also cope as well with the tasks a desktop has to deal with and vice versa. For Ubuntu Desktop, perceived desktop performance and interactivity should come first, so perhaps the kernel defaults here (which might possibly be tuned more for server-type workloads) may not be the best option.
ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
MachineType: System manufacturer P5QL PRO
NonfreeKernelMo
Package: linux-image-
ProcCmdLine: root=UUID=
ProcEnviron:
LANG=en_GB.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: linux
description: | updated |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in linux (Ubuntu): | |
status: | Expired → Confirmed |
I've been running with the "anticipatory" scheduler for a long time now. The same bug drove me to experiment with the schedulers. Responsiveness under heavy I/O is much better than with CFQ
Every once in a while (when changing kernels) I try CFQ again, without luck. I know CFQ has a few kernel params that we can play with but that's beyond my knowledge unfortunately so I just stuck to using "anticipatory".