Understanding the I/O handling techniques in block layer
While exploring the block layer in Chapter 4 and Chapter 5, we often mentioned the performance sensitivity of block devices and how the block layer has to make informed and intelligent decisions to extract their maximum potential. So far, we haven’t really discussed any of the techniques that help to enhance the performance of block devices.
Going back to the era of spinning drives, the performance of storage drives was a major bottleneck in the I/O stack. Mechanical drives offered decent performance when doing sequential I/O operations. However, for random workloads, their performance deteriorates quite drastically. This is understandable, as mechanical drives have to seek requested locations on disk by spinning and positioning the read-write head on specific locations. The greater the number of random seeks, the greater the performance penalty. Filesystems created on top of block devices try to implement some practices...