Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

🏠 Back to Blog

Disks

  • Modern disks include an on-disk queue for I/O requests. I/O accepted by the disk may either be waiting on the queue or served. While this may imply a first-come, first-served queue, the on-disk controller can apply other algorithms to optimize performance. These algorithms include elevator seeking for rotational disks or separate queues for read and write I/O (especially for flash disks).

Caching

The on-disk cache may also be used to increase write performance, by using it as a write-back cache. This signals writes as having completed after the data transfer to cache and before the slower transfer to persistent storage. The counter-term is the write-through cache, which completes writes only after the full transfer to the next level. Storage write-back caches are often coupled with batteries, in case of power failure.

The best caching is no caching at all.

At the disk device driver level and below, caches may include the following:

  • Device Cache
  • Block Cache
  • Disk Controller Cache
  • Storage Array Cache
  • On-disk Cache

Measuring Time

Storage time can be measured as:

  • I/O request time: the entire time from issuing I/O to it’s completion
  • I/O Wait time: The time spent waiting in a queue
  • I/O service time: The time during which the I/O was processing