mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagig@dev.mellanox.co.il>
To: Christoph Hellwig <hch@infradead.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Jens Axboe <axboe@kernel.dk>,
	Bart Van Assche <bvanassche@fusionio.com>,
	Robert Elliott <Elliott@hp.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Or Gerlitz <ogerlitz@mellanox.com>, Oren Duer <oren@mellanox.com>,
	"Nicholas A. Bellinger" <nab@linux-iscsi.org>,
	Mike Christie <michaelc@cs.wisc.edu>,
	Bart Van Assche <bvanassche@acm.org>
Subject: Re: scsi-mq V2
Date: Mon, 14 Jul 2014 12:13:26 +0300	[thread overview]
Message-ID: <53C39F36.9010003@dev.mellanox.co.il> (raw)
In-Reply-To: <20140708144829.GA5539@infradead.org>

On 7/8/2014 5:48 PM, Christoph Hellwig wrote:
<SNIP>
> I've pushed out a new scsi-mq.3 branch, which has been rebased on the
> latest core-for-3.17 tree + the "RFC: clean up command setup" series
> from June 29th.  Robert Elliot found a problem with not fully zeroed
> out UNMAP CDBs, which is fixed by the saner discard handling in that
> series.
>
> There is a new patch to factor the code from the above series for
> blk-mq use, which I've attached below.  Besides that the only changes
> are minor merge fixups in the main blk-mq usage patch.

Hey Christoph & Co,

I'd like to share some benchmarks I took on this patch set using iSER 
initiator (+2 pre-submitted performance improvements) vs LIO iSER target.
I ran workloads I think are interesting use-cases (single LUN with 1,2,4 
IO threads up to a fully occupied system doing IO to multiple LUNs).
Overall (except 2 strange anomalies) seems that scsi-mq patches 
(use_blk_mq=N) roughly sustains traditional scsi performance.
On the other hand scsi-mq code path (use_blk_mq=Y) on its own clearly 
shows better performance (tables below).

At first I too hit the aio issues discussed in this thread and converted 
to scsi-mq.3-no-rebase for testing (thanks Doug & Rob for raising it).
I must say that for some reason I get very low numbers for writes vs. 
reads (writes perf stuck at ~20K IOPs per thread), this happens
on 3.16-rc2 even before scsi-mq patches. Did anyone step on this as well 
or is it just a weird problem I'm having in my setup?
Anyway this is why my benchmarks shows only randread IO pattern (getting 
familiar numbers). I need to figure out whats wrong
with IO writes - I'll start bisecting on this.

I also reviewed the patch set and at this point, I don't have any 
comments. So you can add to the series:
Reviewed-by: Sagi Grimberg '<sagig@dev.mellanox.co.il>' (or Tested-by - 
whatever you choose).

I want to state that I tested a traditional iSER initiator - no scsi-mq 
adoption at all.
I started looking into adopting scsi-mq to iSCSI/iSER recently and I 
must that say the scsi-mq adoption is not so
trivial due to iSCSI session-wide CmdSN/StatSN ordering constraints 
(can't just use more RDMA channels per connection...)
I'll be on vacation for the next couple of weeks, so I'll start a 
separate thread to get the community input on this matter.


Results: table entries are KIOPS(CPU%)
3.16-rc2 (scsi-mq patches reverted)
    Threads/LUN   1           2            4
#LUNs
  1             231(6.5%)   355(18.5%)   337(31.1%)
  2             446(13.6%)  673(37.2%)   654(49.8%)
  4             594(25%)    960(49.41%) 1165(99.3%)
  8            1018(50.3%) 1563(99.6%)  1696(99.9%)
  16           1660(86.5%) 1731(99.6%)  1710(100%)


3.16-rc2 (scsi-mq included, use_blk_mq=N)
    Threads/LUN   1           2            4
#LUNs
  1             231(6.5%)   351(18.5%)   337(31.4%)
  2             446(13.6%)  660(37.3%)   647(50%)
  4             591(25%)    967(49.7%)  1136(98.1%)
  8            1014(52.1%) 1296(100%)   1470(100%)
  16           1741(100%)  1761(100%)   1853(100%)


3.16-rc2 (scsi-mq included, use_blk_mq=Y)
    Threads/LUN   1           2            4
#LUNs
  1             265(6.4%)   465(13.4%)   572(27.9%)
  2             507(13.4%)  902(27.8%)  1034(45.9%)
  4             697(25%)   1197(49.5%)  1477(98.6%)
  8            1257(53.6%) 1856(98.7%)  1906(100%)
  16           1991(100%)  2021(100%)   2020(100%)

Notes:
     - IOPs measurements are the average of a 60 seconds runs.
     - The CPU measurement is the total usage across all CPUs, In order
       to understand per-CPU utilization value should be normalized to 16
       cores.
     - scsi_mq (use_blk_mq=N) has roughly the same performance as
       traditional scsi IO path but I see an anomaly in test cases
       {8 LUNs, 2/4 threads per LUN}. This may result in NUMA
       misalignment for threads/interrupts – requires further
       investigation.
     - iSER initiator has no Multi-Queue awareness.

Testing environment:
     - Initiator and target systems of 16 (8x2) cores (Hyperthreading
       disabled).
     - CPU model: Intel(R) Xeon(R) @ 2.60GHz
     - Block Layer settings:
     - scheduler=noop
         - rq_affinity=1
         - add_random=0
         - nomerges=1
     - Single FDR link between the target and initiator.
     - Device model: Mellanox ConnectIB (the numbers are also familiar
       with Mellanox ConnectX-3).
     - MSIX interrupt vectors were spread across system cores.
     - irqbalancer was disabled.
     - scsi_host settings:
         - cmd_per_lun=32 (default)
         - can_queue=113 (default)
     - In the multi-LUN test cases, each LUN exposed via different
       scsi_host (iSCSI session).

Software:
     - fio version: 2.0.13
     - LIO iSER target (target-pending for-next)
     - Null backing devices (NULLIO)
     - Upstream based iSER initiator + internal pre-submitted
       performance enhancements.

fio configuration:
rw=randread
bs=1k
iodepth=128
loops=1
ioengine=libaio
direct=1
invalidate=1
fsync_on_close=1
randrepeat=1
norandommap

Cheers,
Sagi.

  parent reply	other threads:[~2014-07-14  9:13 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25 16:51 Christoph Hellwig
2014-06-25 16:51 ` [PATCH 01/14] sd: don't use rq->cmd_len before setting it up Christoph Hellwig
2014-07-09 11:12   ` Hannes Reinecke
2014-07-09 15:03     ` Christoph Hellwig
2014-06-25 16:51 ` [PATCH 02/14] scsi: split __scsi_queue_insert Christoph Hellwig
2014-07-09 11:12   ` Hannes Reinecke
2014-06-25 16:51 ` [PATCH 03/14] scsi: centralize command re-queueing in scsi_dispatch_fn Christoph Hellwig
2014-07-08 20:51   ` Elliott, Robert (Server Storage)
2014-07-09  6:40     ` Christoph Hellwig
2014-07-09 11:13   ` Hannes Reinecke
2014-06-25 16:51 ` [PATCH 04/14] scsi: set ->scsi_done before calling scsi_dispatch_cmd Christoph Hellwig
2014-07-09 11:14   ` Hannes Reinecke
2014-06-25 16:51 ` [PATCH 05/14] scsi: push host_lock down into scsi_{host,target}_queue_ready Christoph Hellwig
2014-07-09 11:14   ` Hannes Reinecke
2014-06-25 16:51 ` [PATCH 06/14] scsi: convert target_busy to an atomic_t Christoph Hellwig
2014-07-09 11:15   ` Hannes Reinecke
2014-06-25 16:51 ` [PATCH 07/14] scsi: convert host_busy to atomic_t Christoph Hellwig
2014-07-09 11:15   ` Hannes Reinecke
2014-06-25 16:51 ` [PATCH 08/14] scsi: convert device_busy " Christoph Hellwig
2014-07-09 11:16   ` Hannes Reinecke
2014-07-09 16:49   ` James Bottomley
2014-07-10  6:01     ` Christoph Hellwig
2014-06-25 16:51 ` [PATCH 09/14] scsi: fix the {host,target,device}_blocked counter mess Christoph Hellwig
2014-07-09 11:12   ` Hannes Reinecke
2014-07-10  6:06     ` Christoph Hellwig
2014-06-25 16:51 ` [PATCH 10/14] scsi: only maintain target_blocked if the driver has a target queue limit Christoph Hellwig
2014-07-09 11:19   ` Hannes Reinecke
2014-07-09 15:05     ` Christoph Hellwig
2014-06-25 16:51 ` [PATCH 11/14] scsi: unwind blk_end_request_all and blk_end_request_err calls Christoph Hellwig
2014-07-09 11:20   ` Hannes Reinecke
2014-06-25 16:51 ` [PATCH 12/14] scatterlist: allow chaining to preallocated chunks Christoph Hellwig
2014-07-09 11:21   ` Hannes Reinecke
2014-06-25 16:52 ` [PATCH 13/14] scsi: add support for a blk-mq based I/O path Christoph Hellwig
2014-07-09 11:25   ` Hannes Reinecke
2014-07-16 11:13   ` Mike Christie
2014-07-16 11:16     ` Christoph Hellwig
2014-06-25 16:52 ` [PATCH 14/14] fnic: reject device resets without assigned tags for the blk-mq case Christoph Hellwig
2014-07-09 11:27   ` Hannes Reinecke
2014-06-26  4:50 ` scsi-mq V2 Jens Axboe
2014-06-26 22:07   ` Elliott, Robert (Server Storage)
2014-06-27 14:42     ` Bart Van Assche
2014-06-30 15:20   ` Jens Axboe
2014-06-30 15:25     ` Christoph Hellwig
2014-06-30 15:54       ` Martin K. Petersen
2014-07-08 14:48 ` Christoph Hellwig
2014-07-09 16:39   ` Douglas Gilbert
2014-07-09 19:38     ` Jens Axboe
2014-07-10  0:53       ` Elliott, Robert (Server Storage)
2014-07-10  6:20         ` Christoph Hellwig
2014-07-10 13:36           ` Benjamin LaHaise
2014-07-10 13:39             ` Jens Axboe
2014-07-10 13:44               ` Benjamin LaHaise
2014-07-10 13:48                 ` Jens Axboe
2014-07-10 13:50                   ` Benjamin LaHaise
2014-07-10 13:52                     ` Jens Axboe
2014-07-10 13:50             ` Christoph Hellwig
2014-07-10 13:52               ` Jens Axboe
2014-07-10 14:36                 ` Elliott, Robert (Server Storage)
2014-07-10 14:45                   ` Benjamin LaHaise
2014-07-10 15:11                     ` Jeff Moyer
2014-07-10 19:59                       ` Jens Axboe
2014-07-10 20:05                         ` Jeff Moyer
2014-07-10 20:06                           ` Jens Axboe
2014-07-10 15:51           ` Elliott, Robert (Server Storage)
2014-07-10 16:04             ` Christoph Hellwig
2014-07-10 16:14               ` Christoph Hellwig
2014-07-10 18:49                 ` Elliott, Robert (Server Storage)
2014-07-10 19:14                   ` Jeff Moyer
2014-07-10 19:36                     ` Jeff Moyer
2014-07-10 21:10                     ` Elliott, Robert (Server Storage)
2014-07-11  6:02                       ` Elliott, Robert (Server Storage)
2014-07-11  6:14                         ` Christoph Hellwig
2014-07-11 14:33                           ` Elliott, Robert (Server Storage)
2014-07-11 14:55                             ` Benjamin LaHaise
2014-07-12 21:50                               ` Elliott, Robert (Server Storage)
2014-07-12 23:20                                 ` Elliott, Robert (Server Storage)
2014-07-13 17:15                                   ` Elliott, Robert (Server Storage)
2014-07-14 17:15                                     ` Benjamin LaHaise
2014-07-14  9:13   ` Sagi Grimberg [this message]
2014-08-21 12:32     ` Performance degradation in IO writes vs. reads (was scsi-mq V2) Sagi Grimberg
2014-08-21 13:03       ` Christoph Hellwig
2014-08-21 14:02         ` Sagi Grimberg
2014-08-24 16:41           ` Sagi Grimberg

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=53C39F36.9010003@dev.mellanox.co.il \
    --to=sagig@dev.mellanox.co.il \
    --cc=Elliott@hp.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=bvanassche@fusionio.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=nab@linux-iscsi.org \
    --cc=ogerlitz@mellanox.com \
    --cc=oren@mellanox.com \
    /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

Powered by JetHome