I have a linux database(MySQL) server(Dell 2950) with a 6-disk RAID 10. The default IO scheduler on it is CFQ. However, from what I have read and heard, there is no need for a scheduler like CFQ when reordering/scheduling is also done by underlying RAID controller; on the contrary since it does not account underlying RAID configuration into account performance may actually degrade with CFQ. The primary concern is to reduce CPU usage and improve throughput. Also, I have seen recommendations of using noop/deadline IO scheduler for databases primarily because of the nature of their R/W access.
So, the question is whether noop or deadline scheduler should be used instead of CFQ in these circumstances.
Every workload is different. So there's not one size fits all answer to this question. To make things more complicated most of the IO Schedulers have tunables. So the best thing you can do is test with as close to real workload benchmarking as possible. Just as long as your test is repeatable it should work.
You can change IO schedulers on the fly without rebooting which makes experimenting with io schedulers easy to do. To do this use a command like this
echo anticipatory | sudo tee /sys/block/sdb/queue/scheduler
replacing the anticipatory with the scheduler of choice and sdb with the correct block device. You can also doecho anticipatory > /sys/block/sdb/queue/scheduler
if you're logged in as root. I use the tee approach so that I can just use sudo.Like minaev I've had a lot of luck with Deadline on busy file servers. We didn't have any database stuff as it was mostly image processing with a computing cluster. But they would saturate 2 GigE links and load up that server for 48 hours at a time.
I have also used NOOP when dealing with external RAID arrays. What I mean by external is that the RAID controller is self contained in the external chassis and the server just sees this as a SCSI drive. If the RAID controller is in the server then I think you still want to avoid NOOP. But you should be able to figure out what works best for you with some benchmarking.
Not sure if it helps, but here's an interesting article from Red Hat Magazine: "Choosing an I/O Scheduler for Red Hat® Enterprise Linux® 4 and the 2.6 Kernel". I usually set the scheduler to deadline and it works OK on my servers, but I have to admit I have no figures that would prove that deadline is really better.