Elevator linus

From LQWiki
Jump to navigation Jump to search

The Elevator_linus IO Scheduler/elevator

The algorithms used to schedule disk IO requests are referred to as elevator algorithms. The 2.4 kernel has only a single elevator known as Elevator_linus, in 2.6 you have the choice of the four elevators Deadline, Anticipatory, No-op and CFQ.

Elevator_linus assigns each IO request an elevator_sequence field, the field is set to a default value when the IO request is first placed on the queue. If all requests in the queue have the same value in their elevator_sequence then the queue is serviced in an FIFO fashion. However if an IO operation has a lower elevator_sequence number it will be taken from the queue before requests with a higher value. Each time a new IO request is added to the queue, the elevator_sequence value for all other requests is decremented, thus increasing the priority of older queue entries.

Typically read requests start off with a lower elevator_sequence than write operations, this is because typically read requests are more critical to perceived system performance. The defaults can be influenced using the elvtune utilty.