linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* dm-multipath low performance with blk-mq
@ 2016-01-18 12:04 Sagi Grimberg
  0 siblings, 0 replies; 62+ messages in thread
From: Sagi Grimberg @ 2016-01-18 12:04 UTC (permalink / raw)


Hi All,

I've recently tried out dm-multipath over a "super-fast" nvme device
and noticed a serious lock contention in dm-multipath that requires some
extra attention. The nvme device is a simple loopback device emulation
backed by null_blk device.

With this I've seen dm-multipath pushing around ~470K IOPs while
the native (loopback) nvme performance can easily push up to 1500K+ IOPs.

perf output [1] reveals a huge lock contention on the multipath lock
which is a per-dm_target contention point which seem to defeat the
purpose of blk-mq i/O path.

The two current bottlenecks seem to come from multipath_busy and
__multipath_map. Would it make better sense to move to a percpu_ref
model with freeze/unfreeze logic for updates similar to what blk-mq
is doing?

Thoughts?


[1]:
-  23.67%              fio  [kernel.kallsyms]    [k] 
queued_spin_lock_slowpath
    - queued_spin_lock_slowpath
       - 51.40% _raw_spin_lock_irqsave
          - 99.98% multipath_busy
               dm_mq_queue_rq
               __blk_mq_run_hw_queue
               blk_mq_run_hw_queue
               blk_mq_insert_requests
               blk_mq_flush_plug_list
               blk_flush_plug_list
               blk_finish_plug
               do_io_submit
               SyS_io_submit
               entry_SYSCALL_64_fastpath
             + io_submit
       - 48.05% _raw_spin_lock_irq
          - 100.00% __multipath_map
               multipath_clone_and_map
               target_message
               dispatch_io
               __blk_mq_run_hw_queue
               blk_mq_run_hw_queue
               blk_mq_insert_requests
               blk_mq_flush_plug_list
               blk_flush_plug_list
               blk_finish_plug
               do_io_submit
               SyS_io_submit
               entry_SYSCALL_64_fastpath
             + io_submit
+   1.70%              fio  [kernel.kallsyms]    [k] __blk_mq_run_hw_queue
+   1.56%              fio  fio                  [.] get_io_u
+   1.06%              fio  [kernel.kallsyms]    [k] blk_account_io_start
+   0.92%              fio  fio                  [.] do_io
+   0.82%              fio  [kernel.kallsyms]    [k] do_blockdev_direct_IO
+   0.81%              fio  [kernel.kallsyms]    [k] 
blk_mq_hctx_mark_pending
+   0.75%              fio  [kernel.kallsyms]    [k] __blk_mq_alloc_request
+   0.75%              fio  [kernel.kallsyms]    [k] __bt_get
+   0.69%              fio  [kernel.kallsyms]    [k] do_direct_IO

^ permalink raw reply	[flat|nested] 62+ messages in thread

end of thread, other threads:[~2016-02-15  6:47 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <569E11EA.8000305@dev.mellanox.co.il>
2016-01-19 22:45 ` dm-multipath low performance with blk-mq Mike Snitzer
2016-01-25 21:40   ` Mike Snitzer
2016-01-25 23:37     ` [dm-devel] " Benjamin Marzinski
2016-01-26 13:29       ` Mike Snitzer
     [not found]         ` <56A77C21.90605@suse.de>
2016-01-26 14:47           ` Mike Snitzer
2016-01-26 14:56             ` Christoph Hellwig
2016-01-26 15:27               ` Mike Snitzer
2016-01-27 11:14         ` Sagi Grimberg
2016-01-27 17:48           ` Mike Snitzer
2016-01-27 17:51             ` Jens Axboe
2016-01-27 18:16               ` Mike Snitzer
2016-01-27 18:26                 ` Jens Axboe
2016-01-27 19:14                   ` Mike Snitzer
2016-01-27 19:50                     ` Jens Axboe
2016-01-27 17:56             ` Sagi Grimberg
2016-01-27 18:42               ` Mike Snitzer
2016-01-27 19:49                 ` Jens Axboe
2016-01-27 20:45                   ` Mike Snitzer
2016-01-29 23:35               ` Mike Snitzer
2016-01-30  8:52                 ` Hannes Reinecke
2016-01-30 19:12                   ` Mike Snitzer
2016-02-01  6:46                     ` Hannes Reinecke
2016-02-03 18:04                       ` Mike Snitzer
2016-02-03 18:24                         ` Mike Snitzer
2016-02-03 19:22                           ` Mike Snitzer
2016-02-04  6:54                           ` Hannes Reinecke
2016-02-04 13:54                             ` Mike Snitzer
2016-02-04 13:58                               ` Hannes Reinecke
2016-02-04 14:09                                 ` Mike Snitzer
2016-02-04 14:32                                   ` Hannes Reinecke
2016-02-04 14:44                                     ` Mike Snitzer
2016-02-05 15:13                               ` [RFC PATCH] dm: fix excessive dm-mq context switching Mike Snitzer
2016-02-05 18:05                                 ` Mike Snitzer
2016-02-05 19:19                                   ` Mike Snitzer
2016-02-07 15:41                                     ` Sagi Grimberg
2016-02-07 16:07                                       ` Mike Snitzer
2016-02-07 16:42                                         ` Sagi Grimberg
2016-02-07 16:37                                       ` Bart Van Assche
2016-02-07 16:43                                         ` Sagi Grimberg
2016-02-07 16:53                                           ` Mike Snitzer
2016-02-07 16:54                                           ` Sagi Grimberg
2016-02-07 17:20                                             ` Mike Snitzer
2016-02-08 12:21                                               ` Sagi Grimberg
2016-02-08 14:34                                                 ` Mike Snitzer
2016-02-09  7:50                                               ` Hannes Reinecke
2016-02-09 14:55                                                 ` Mike Snitzer
2016-02-09 15:32                                                   ` Hannes Reinecke
2016-02-10  0:45                                                     ` Mike Snitzer
     [not found]                                                       ` <20160211015030.GA4481@redhat.com>
2016-02-11  3:35                                                         ` RCU-ified dm-mpath for testing/review Mike Snitzer
2016-02-11 15:34                                                         ` Mike Snitzer
2016-02-12 15:18                                                           ` Hannes Reinecke
2016-02-12 15:26                                                             ` Mike Snitzer
2016-02-12 16:04                                                               ` Hannes Reinecke
2016-02-12 18:00                                                                 ` Mike Snitzer
2016-02-15  6:47                                                                   ` Hannes Reinecke
2016-01-26  1:49     ` [dm-devel] dm-multipath low performance with blk-mq Benjamin Marzinski
2016-01-26 16:03     ` Mike Snitzer
2016-01-26 16:44       ` Christoph Hellwig
2016-01-27  2:09         ` Mike Snitzer
2016-01-27 11:10           ` Sagi Grimberg
2016-01-26 21:40       ` [dm-devel] " Benjamin Marzinski
2016-01-18 12:04 Sagi Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).