![Lead Image © pandavector, 123RF.com Lead Image © pandavector, 123RF.com](/var/ezflow_site/storage/images/archive/2018/44/linux-i-o-schedulers/po-26082-123rf-pandavector_123rf-comic_clock_resized.png/150357-1-eng-US/PO-26082-123RF-pandavector_123RF-Comic_Clock_resized.png1_medium.png)
Lead Image © pandavector, 123RF.com
Linux I/O Schedulers
A Schedule to Keep
The Linux kernel is a very complex piece of software used on a variety of computers, including embedded devices that need real-time performance, hand-held devices, laptops, desktops, servers, database servers, video servers, and very large supercomputers, including all of those in the TOP500 [1]. All of these computers have very different requirements, some of which include responsiveness to user input (e.g., so streaming music, video, or other interactivity is not interrupted). At the same time, the devices require good I/O performance to make sure data is saved properly. Some workloads have very high I/O throughput, so to make sure these requirements are met, the kernel uses schedulers.
Schedulers do exactly what they say: schedule activities within the kernel so that system activities and resources achieve an overall goal for the system. This goal could be low latency for input (as embedded systems require), better interactivity, faster I/O, or even a combination of goals. Primarily, schedulers are concerned with CPU resources, but they could also consider other system resources (e.g., memory, input devices, networks, etc.).
The focus of this article is the I/O scheduler, including I/O scheduler concepts and the various options that are available for I/O tuning.
Intro to I/O Schedulers
Virtually all applications running on Linux do some sort of I/O. Even surfing the web writes a number of small files to disk. Without an I/O scheduler, every I/O request would send an interrupt to the kernel so that the I/O operation could be performed, moving the disk head around different blocks to satisfy the read and write requests. Over time, the disparity between the performance of disk drives and the rest of the system grows very rapidly, making I/O more important to overall system performance. As you can imagine, when the kernel has to
...Buy this article as PDF
(incl. VAT)