What configuration optimizations e.g. disk scheduling algorithms are suggested for a very write intensive setup ?
2 Answers
You should look at the deadline
I/O scheduler elevator for the the access pattern you're describing.
Is this a physical system or virtual? If you have a hardware RAID controller, you'll want to ensure that you have some form of battery or flash-backed write cache available to buffer and coalesce writes.
If this is a RHEL 6.x system, look into tuned and tuned-adm profiles to set some corresponding parameters based on the system's application.
Some other interesting controller and block-device settings are detailed here: Linux - real-world hardware RAID controller tuning (scsi and cciss)
In addition to the links ewwhite gave above you will want to look at the Red Hat Performance tuning guide. I have linked the version for RHEL6.
Doing performance tuning correctly takes a lot of time and patience. You need to first figure out how to accurately and consistently simulate your work loads. You will need to create your own methodology for capturing baseline performance metrics, and then capturing those metrics for each configuration change. It's easy to change a bunch of parameters and end up in a worse situation and not know which parameter is the culprit.
While the deadline scheduler may be a good scheduler to start your testing with it's wroth pointing out that it may in fact not be the best scheduler for your particular workload. The deadline scheduler is a deterministic IO scheduler meaning all read and write operations happen in a known time frame. The default scheduler (Completely Fair Queuing CFQ) have different time intervals between each IO operation. Tt is possible the CFQ scheduler is better as it will try to buffer and reorder writes so they are more platter efficient. It is worth pointing out that while it is possible the CFQ scheduler may improve write performance in specific workloads it will likely increase latency for reads due to the IO operation buffering. In addition if you have hardware IO controllers such as SBAs or RAID controllers using the NOOP scheduler may actually be the most efficient for those particular devices. The reason for this is the NOOP does not attempt to order the IO operations and essentially offloads the operations to the controller. If you are in a virtualized environment it is often best to use the NOOP scheduler for all of your guest operating systems as they will not spend time reordering IO operations, but rather send it to the hypervisor to let that layer handle the operations.
Good luck with your tuning, if you don't mind please report back your findings so others can learn as well.
- 2,074
- 13
- 14
-
1RHEL updated the `tuned` package in EL6.3 to include a [profile for virtual guests](http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/6.3_Technical_Notes/tuned.html). Looking at the tuning parameters they recommend, I was surprised to see that they default to the `deadline` I/O scheduler rather than `noop`. – ewwhite Jul 27 '12 at 08:17