Currently min IOPS limit in QoS is 10k, defined in SPDK_BDEV_QOS_MIN_IOS_PER_SEC macro. If user specifies an IOPS parameter which is smaller than 10k, the IOPS limit will be rounded up to 10k.
Though 10k IOPS is low enough for normal cases, 1k IOPS could still be required in some special cases. For example, in cloud computing scenario a tenant uses a virtualized block device, which eventually maps to a bdev module in SPDK. After a period of time, this tenant has run out of credit, then storage resources provided to this tenant should be limited as possible. But under 10K IOPS, with 40MB bandwidth for 4K io size, the effect of rate limit is not quite obvious.
And from the view of implementation, qos mechanism in bdev layer supports 1k IOPS now. Because the qos poller spdk_bdev_channel_poll_qos is called per 1ms, and qos poller produces at lease one remaining_this_timeslice in one call. So qos poller produces at least 1k remaining_this_timeslice for io path to consume. The change to make for supporting min 1K IOPS is just setting SPDK_BDEV_QOS_MIN_IOS_PER_SEC macro to 1000.
Currently min IOPS limit in QoS is 10k, defined in
SPDK_BDEV_QOS_MIN_IOS_PER_SECmacro. If user specifies an IOPS parameter which is smaller than 10k, the IOPS limit will be rounded up to 10k.Though 10k IOPS is low enough for normal cases, 1k IOPS could still be required in some special cases. For example, in cloud computing scenario a tenant uses a virtualized block device, which eventually maps to a bdev module in SPDK. After a period of time, this tenant has run out of credit, then storage resources provided to this tenant should be limited as possible. But under 10K IOPS, with 40MB bandwidth for 4K io size, the effect of rate limit is not quite obvious.
And from the view of implementation, qos mechanism in bdev layer supports 1k IOPS now. Because the qos poller
spdk_bdev_channel_poll_qosis called per 1ms, and qos poller produces at lease one remaining_this_timeslice in one call. So qos poller produces at least 1k remaining_this_timeslice for io path to consume. The change to make for supporting min 1K IOPS is just settingSPDK_BDEV_QOS_MIN_IOS_PER_SECmacro to 1000.