From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Chad Dupuis <chad.dupuis@qlogic.com>, "hch@lst.de" <hch@lst.de>,
linux-scsi <linux-scsi@vger.kernel.org>
Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>,
Saurav Kashyap <saurav.kashyap@qlogic.com>,
Nilesh Javali <nilesh.javali@qlogic.com>,
Jens Axboe <axboe@fb.com>
Subject: Re: Blk-mq/scsi-mq Tuning
Date: Thu, 29 Oct 2015 11:04:47 -0700 [thread overview]
Message-ID: <56325FBF.8010306@sandisk.com> (raw)
In-Reply-To: <D256A425.229C0%chad.dupuis@qlogic.com>
On 10/28/2015 01:11 PM, Chad Dupuis wrote:
> We¹ve begun to explore blk-mq and scsi-mq and wanted to know if there were
> any best practices in terms of block layer settings. We¹re looking
> specifically at the FCoE and iSCSI protocols.
>
> A little background on the queues in our hardware first: we have a per
> connection transmit queue and multiple, global receive queues. The
> transmit queues are not pegged to a particular CPU. The receive queues
> are pegged to the first N CPUs where N is the number of receive queues.
> We set the nr_hw_queues in the scsi_host_template to N as well.
>
> In our initial testing we¹re not seeing the performance scale as we would
> expect so we wanted to see if there some Œknobs¹ if you will that we could
> try tuning to try to increase the performance. Also, one question we did
> have is there an official API to be able to set the CPU affinity of the
> hw_ctx_queues?
(added Jens to CC-list)
Hello Chad,
It's great news that you are looking into adding scsi-mq support for
FCoE and iSCSI initiator HBA's. If you do not see the performance scale
as expected that probably means that lock contention occurs in the code
that submits requests to the SCSI request queues. Have you already tried
to measure L3 cache misses with perf (e.g. perf record -ag -e
LLC-store-misses sleep 10 && perf report) ? If a single function is
responsible for more than 10% of the L3 cache misses usually that means
that that function is causing a bottleneck.
As far as I know an official API for setting the CPU affinity of the
hw_ctx queues is not yet available. The approach of the SRP initiator
driver (ib_srp) is that it assumes that the HCA supports MSI-X and that
MSI-X interrupts have been spread evenly over processors. The ib_srp
driver selects an MSI-X interrupt for each hw_ctx queue via the
comp_vector member of struct ib_cq_init_attr. The script I am using
myself is available at
http://thread.gmane.org/gmane.linux.kernel.device-mapper.devel/21312/focus=98409.
I hope one day that script will be superfluous :-)
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-10-29 18:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 20:11 Blk-mq/scsi-mq Tuning Chad Dupuis
2015-10-29 18:04 ` Bart Van Assche [this message]
2015-10-30 7:44 ` Hannes Reinecke
2015-10-30 13:25 ` Chad Dupuis
2015-10-30 13:38 ` Hannes Reinecke
2015-10-30 14:12 ` Chad Dupuis
2015-10-30 15:00 ` Hannes Reinecke
2015-10-30 20:15 ` Mike Christie
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=56325FBF.8010306@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=axboe@fb.com \
--cc=chad.dupuis@qlogic.com \
--cc=giridhar.malavali@qlogic.com \
--cc=hch@lst.de \
--cc=linux-scsi@vger.kernel.org \
--cc=nilesh.javali@qlogic.com \
--cc=saurav.kashyap@qlogic.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.