Be On Time: Command Duration Limits Feature Support in Linux

Library Content Type:
Publish Date: 
Wednesday, September 29, 2021
Event Name: 
Event Track:
Abstract: 

Delivering high throughput and/or high IO rates while minimizing command execution latency is a common problem to many storage applications. Achieving low command latency to implement a responsive system is often not compatible with high performance. The ATA NCQ IO priority feature set, supported today by many SATA hard-disks, provides a coarse solution to this problem. Commands that require a low latency can be assigned a high priority, while background disk accesses are assigned a normal priority level. This binary hinting for the latency requirements of read and write commands allows a device firmware to execute high priority commands first, therefore achieving the desired lower latency. While NCQ IO priority can satisfy many applications, the standards do not clearly define how high-priority commands should be executed. This often results in significant differences between different device models from different device vendors. The Command Duration Limits (CDL) feature introduces a more detailed definition of command priorities and of their execution by the device. A command duration limit descriptor defines an inactive time limit (command queuing time), active time limit (command execution time) and a policy to apply to the command if one of the limit is exceeded (e.g. abort command, execute command, etc). Up to seven command duration limits can be defined and controlled by the user for read and write commands, allowing a very fine control over disk accesses by an application. Furthermore, unlike the ATA NCQ IO priority feature which has no equivalent in SCSI, Command Duration Limits is defined for both ATA and SCSI disks. This talk will present Linux implementation of CDL support. The kernel interface for discovering and configuring the disk command duration limits is described. Examples will also illustrate how a user application can specify different limits for different IO operations using an interface based off the legacy IO priority support. The effect of Command Duration Limits will be illustrated using results from various micro-benchmarks.

  • Command Duration Limits Feature
  • Linux API for IO priorities and command duration limits
  • Effect of IO priorities and command duration limits on performance

Watch video: