1)AnticipatoryThe anticipatory I/O elevator was created based on the assumption of a block device withonly one physical seek head (for example a single SATA drive). The anticipatory elevatoruses the deadline mechanism described in more detail below plus an anticipationheuristic. As the name suggests, the anticipatory I/O elevator “anticipates” I/O andattempts to write it in single, bigger streams to the disk instead of multiple very smallrandom disk accesses. The anticipation heuristic may cause latency for write I/O. It isclearly tuned for high throughput on general purpose systems such as the averagepersonal computer. Up to kernel release 2.6.18 the anticipatory elevator is the standardI/O scheduler. However most Enterprise Linux distributions default to the CFQ elevator.2)Complete Fair Queuing (CFQ)The CFQ elevator implements a QoS (Quality of Service) policy for processes bymaintaining per-process I/O queues. The CFQ elevator is well suited for large multiusersystems with a lot of competing processes. It aggressively attempts to avoid starvation ofprocesses and features low latency. Starting with kernel release 2.6.18 the improved CFQelevator is the default I/O scheduler.Depending on the system setup and the workload characteristics, the CFQ scheduler canslowdown a single main application, for example a massive database with its fairnessoriented algorithms. The default configuration handles the fairness based on processgroups which compete against each other. For example a single database and all writesthrough the page cache (all pdflush instances are in one pgroup) are considered as asingle application by CFQ that could compete against many background processes. It canbe useful to experiment with I/O scheduler subconfigurations and/or the deadlinescheduler in such cases.3)DeadlineThe deadline elevator is a cyclic elevator (round robin) with a deadline algorithm thatprovides a near real-time behavior of the I/O subsystem. The deadline elevator offersexcellent request latency while maintaining good disk throughput. The implementation ofthe deadline algorithm ensures that starvation of a process cannot occur.4)NOOPNOOP stands for No Operation, and the name explains most of its functionality. TheNOOP elevator is simple and lean. It is a simple FIFO queue that does not perform anydata ordering. NOOP simply merges adjacent data requests, so it adds very low processoroverhead to disk I/O. The NOOP elevator assumes that a block device either features itsown elevator algorithm such as TCQ for SCSI, or that the block device has no seek latencysuch as a flash card.
A write barrier is a kernel mechanism used to ensure that file system metadata is correctly written and ordered on persistent storage, even when storage devices with volatile write caches lose power.The disk contains all the data. No re-ordering has occurred. With barriers enabled, an fsync() call will also issue a storage cache flushWhen a write hits in a cache, two possible policy choices exist. First, the data can be writtenboth into the cache and passed on to the next lower level in the memory hierarchy. This policy iscalled write-through. A second possible policy on write hits is to only write the data to thefirst-level cache. Only when a dirty line (i.e., a line that has been written to) is replaced in thecache is the data transferred to a lower level in the memory hierarchy. This policy is calledwrite-back.