From: Walker, Benjamin <benjamin.walker at intel.com>
To: spdk@lists.01.org
Subject: Re: [SPDK] vhost-user-blk client?
Date: Fri, 15 Feb 2019 17:36:17 +0000 [thread overview]
Message-ID: <6d102c4e167ae8669bafdf4ce904154e15aaad8c.camel@intel.com> (raw)
In-Reply-To: CAHUk8cRZ3W5bffUW_ZMD5ZJQuMjGw0aU6UrHg_OixtBbRbx28g@mail.gmail.com
[-- Attachment #1: Type: text/plain, Size: 2658 bytes --]
On Wed, 2019-02-13 at 09:44 -0700, Michael Haeuptle wrote:
> Hello,
>
> I was wondering if there is a client side API for vhost-user-blk.
> Basically, I'd like to make block IO requests from another process to my
> vhost app. In other words, my process would be replacing QEMU.
>
> Is bdev_virtio_blk.c a good starting point?
Darek is answering your questions on another thread, but I want to take this
opportunity to say that using vhost-user-* as a mechanism for fast block storage
IPC between processes is a great architecture for a number of reasons (that you
probably already see, but this note is for everyone else!) and we very highly
recommend this strategy to anyone out there laying out an architecture for use
with SPDK.
There are a two challenges in particular that come up when using SPDK as part of
a large system. First, the SSD often needs to be shared between multiple
different applications. When using it via the kernel, partitions or the
filesystem can be leveraged, but for SPDK you can't use the block stack from
outside of the process it is running in. One way to solve it would be to run all
of the applications and SPDK in the same process, but for robustness you really
want to be able to handle an application crash without taking everything else
down with it. The solution here is to run a "block stack service" process that
is essentially the SPDK vhost target. Then, each application can connect to it
using the vhost-user initiators we have and perform fast IPC. The vhost target
can expose the SPDK logical volumes it creates as separate disks (or it can do
GPT partitions), so SSDs can be shared effectively.
The second main challenge is that NVMe SSDs have a fairly limited number of
queue pairs in practice. When the NVMe SSD is shared between several
applications, each of which wants to do I/O on lots of threads, you quickly end
up running out. Using the vhost target to expose a block service lifts this
restriction, because it can expose any number of software virtqueues and it will
correctly mux them onto the real NVMe queue pairs for each device.
This is more or less why we created the new unified target application
(app/spdk_tgt) which is both a vhost target as well as an NVMe-oF and iSCSI
target. It can be deployed as a user space block service on each system and can
expose bdevs locally via virtio-user and remotely via NVMe-oF or iSCSI, all
configurable at run time via JSON-RPC.
>
> Thanks.
>
> -- Michael
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk
next reply other threads:[~2019-02-15 17:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-15 17:36 Walker, Benjamin [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-02-20 22:28 [SPDK] vhost-user-blk client? Michael Haeuptle
2019-02-15 7:52 Stojaczyk, Dariusz
2019-02-15 6:41 Andrey Kuzmin
2019-02-15 6:38 Andrey Kuzmin
2019-02-14 17:01 Stojaczyk, Dariusz
2019-02-14 16:35 Stojaczyk, Dariusz
2019-02-14 15:42 Michael Haeuptle
2019-02-14 10:19 Andrey Kuzmin
2019-02-14 10:02 Stojaczyk, Dariusz
2019-02-13 16:44 Michael Haeuptle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d102c4e167ae8669bafdf4ce904154e15aaad8c.camel@intel.com \
--to=spdk@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox