Hi, Community:
For one nvme device, if i config SPDK with two partitions, is there any way to limit
the transfer speed to a fix speed? I know the kernel has cgroup limit and buffered io
limit, if i want to implement this in SPDK, is there a way to archive this?
Thanks,
Xun

Hi Xun,
I'm pretty new to SPDK so I'm sure some others will jump in but first I wanted to
make sure you saw Ben's email on IRC (attached). We're trying to channel more
discussions to IRC as opposed to email but you're, of course, welcome to continue to
use the dist list if that's more convenient for you.
Given that SPDK apps are typically given a full core, is it the case that you are trying
to implement a basic form of QoS? Also, are you just using the SPDK NVMe driver or are you
using other modules as well? As much info as you can provide on your application and what
problem you are trying to solve would be great!
Thanks!!
Paul
From: SPDK [mailto:spdk-bounces@lists.01.org] On Behalf Of nixun_992(a)sina.com
Sent: May 7, 2017 12:17 AM
To: spdk <spdk(a)lists.01.org&gt;
Subject: [SPDK] Any idea for SPDK to limit the data transfer speed
Hi, Community:
For one nvme device, if i config SPDK with two partitions, is there any way to limit
the transfer speed to a fix speed? I know the kernel has cgroup limit and buffered io
limit, if i want to implement this in SPDK, is there a way to archive this?
Thanks,
Xun

Hi Xun,
Very good question, but currently SPDK does not have such feature.
One crude implementation: you can modify function bdev_nvme_poll:
spdk_nvme_qpair_process_completions(qpair, 0),
replace 0 with a different number such as 8. This means batch of I/O at a time instead of
wrap around.
From: SPDK [mailto:spdk-bounces@lists.01.org] On Behalf Of nixun_992(a)sina.com
Sent: Sunday, May 7, 2017 3:17 PM
To: spdk <spdk(a)lists.01.org&gt;
Subject: [SPDK] Any idea for SPDK to limit the data transfer speed
Hi, Community:
For one nvme device, if i config SPDK with two partitions, is there any way to limit
the transfer speed to a fix speed? I know the kernel has cgroup limit and buffered io
limit, if i want to implement this in SPDK, is there a way to archive this?
Thanks,
Xun

For one nvme device, if i config SPDK with two partitions, is there any
way to limit the transfer speed to a fix speed? I know the kernel has cgroup
limit and buffered io limit, if i want to implement this in SPDK, is there a
way to archive this?

As Changpeng said, we don't have any quality of service code in SPDK today
(patches welcome). However, we do have a vision for where that type of code
would go. We expect this type of thing to be implemented as a bdev module
(lib/bdev). Specifically, a virtual bdev that is layered on top of the other
physical bdevs. That way, the same code can be used for all of the different
types of backing storage. We have one example of how to write a virtual bdev
(lib/bdev/split) which is a simple splitter that you can use to get started.
Note that the community is currently doing some major refactoring on the bdev
layer in preparation for stabilizing and "finalizing" the API of this
component.
The big changes coming do the following things:
1) Use the env wrapper instead of calling DPDK directly
2) Remove the dependency on the event framework (lib/event)
3) Full support for zero copy read and write, where possible*
4) Documentation!
*This is only possible with appropriate hardware support
Thanks,
Ben