Storage Performance Development Kit (SPDK)
 help / color / mirror / Atom feed
From: Harris, James R <james.r.harris at intel.com>
To: spdk@lists.01.org
Subject: Re: [SPDK] Performance Scaling in BlobFS/RocksDB by Multiple I/O Threads
Date: Wed, 31 Jan 2018 18:09:23 +0000	[thread overview]
Message-ID: <3AE75A2D-B58F-496E-8AC5-BED6F58F7D39@intel.com> (raw)
In-Reply-To: CALOt4ifK34j3QAkJTSA4HLrW=ixqRftFCL4vnRRQvAsdZTN6rA@mail.gmail.com

[-- Attachment #1: Type: text/plain, Size: 3278 bytes --]

Hi Fenggang,

The max IOPs number is per-device – not per-queue.  The observed latency for each I/O - from submission to completion - will be the same whether the 128 I/O are submitted on one queue or across four queues.  Spreading the I/O across four queues instead of one just means that the device will process ¼ the rate of I/O from each of the four queues compared to if it was submitted on a single queue.

For BlobFS, spreading the I/O across multiple NVMe queues would not normally help with latency.  There are NVMe features such as Weighted Round Robin (WRR), which provide different priorities to different queues.  With WRR, multiple NVMe queues could be used to separate high priority I/O (i.e. WAL writes) from lower priority I/O (i.e. background compaction I/O).  Most NVMe devices today do not support WRR however and even then it’s still questionable whether WRR alone would be sufficient or if additional software queuing would be required.

Thanks,
-Jim




From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Fenggang Wu <fenggang(a)cs.umn.edu>
Reply-To: Storage Performance Development Kit <spdk(a)lists.01.org>
Date: Wednesday, January 31, 2018 at 10:49 AM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Cc: "wuxx0835(a)umn.edu" <wuxx0835(a)umn.edu>
Subject: [SPDK] Performance Scaling in BlobFS/RocksDB by Multiple I/O Threads

Hi All,

I read from the SPDK doc "NVMe Driver Design -- Scaling Performance" (here<http://www.spdk.io/doc/nvme.html#nvme_design>), which saids:

" For example, if a device claims to be capable of 450,000 I/O per second at queue depth 128, in practice it does not matter if the driver is using 4 queue pairs each with queue depth 32, or a single queue pair with queue depth 128."

Does this consider the queuing latency? I am guessing the latency in the two cases will be different ( in qp/qd = 4/32 and in qp/qd = 1/128). In the 4 threads case, the latency will be 1/4 of the 1 thread case. Do I get it right?

If so, then I got confused as the document also says:

"In order to take full advantage of this scaling, applications should consider organizing their internal data structures such that data is assigned exclusively to a single thread."

Please correct me if I get it wrong. I understand that if the dedicate I/O thread has the total ownership of the I/O data structures, there is no lock contention to slow down the I/O. I believe that BlobFS is also designed in this philosophy in that only one thread is doing I/O.

But considering the RocksDB case, if the shared data structure has already been largely taken care of by the RocksDB logic via locking (which is inevitable anyway), the I/O requests each RocksDB thread sends to the BlobFS could also has its own queue pair to do I/O. More I/O threads means shorter queue depth and smaller queuing delay.

Even if there is some FS metadata operations that may require some locking, but I would guest such metadata operation takes only a small portion.

Therefore, is it a viable idea to have more I/O threads in the BlobFS to serve the multi-threaded RocksDB for a smaller delay? What will be the pitfalls, or challenges?

Any thoughts/comments are appreciated. Thank you very much!

Best!
-Fenggang

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 8550 bytes --]

             reply	other threads:[~2018-01-31 18:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 18:09 Harris, James R [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-02-01 15:21 [SPDK] Performance Scaling in BlobFS/RocksDB by Multiple I/O Threads Harris, James R
2018-02-01  0:24 Fenggang Wu
2018-01-31 22:23 Fenggang Wu
2018-01-31 18:22 Walker, Benjamin
2018-01-31 17:49 Fenggang Wu

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=3AE75A2D-B58F-496E-8AC5-BED6F58F7D39@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