From: "Richard W.M. Jones" <rjones@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: Increased memory usage with scsi-mq
Date: Mon, 7 Aug 2017 13:27:02 +0100 [thread overview]
Message-ID: <20170807122701.GH20914@redhat.com> (raw)
In-Reply-To: <b133b97e-9660-ba9b-51de-39fa23fce903@redhat.com>
On Mon, Aug 07, 2017 at 02:11:39PM +0200, Paolo Bonzini wrote:
> You could also add a module parameter to the driver, and set it to 64 on
> the kernel command line (there is an example in
> drivers/scsi/vmw_pvscsi.c of how to do it).
[Proviso: I've not tested the performance of difference values, nor do
I have any particular knowledge in this area]
can_queue is documented as:
* This determines if we will use a non-interrupt driven
* or an interrupt driven scheme. It is set to the maximum number
* of simultaneous commands a given host adapter will accept.
Wouldn't it be better to make it default to k * number of CPUs for
some small integer k?
I looked at the other scsi drivers and they set it to all kinds of
values. 1, small integers, large integers, configurable values.
Also I noticed this code in virtio_scsi.c:
cmd_per_lun = virtscsi_config_get(vdev, cmd_per_lun) ?: 1;
shost->cmd_per_lun = min_t(u32, cmd_per_lun, shost->can_queue);
but setting cmd_per_lun (as a qemu virtio-scsi-pci parameter) didn't
seem to make any difference to memory usage.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
next prev parent reply other threads:[~2017-08-07 12:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 21:00 Increased memory usage with scsi-mq Richard W.M. Jones
2017-08-05 8:44 ` Christoph Hellwig
2017-08-05 9:27 ` Richard W.M. Jones
2017-08-05 13:39 ` Christoph Hellwig
2017-08-05 15:51 ` Richard W.M. Jones
2017-08-07 12:11 ` Paolo Bonzini
2017-08-07 12:27 ` Richard W.M. Jones [this message]
2017-08-07 13:07 ` Paolo Bonzini
2017-08-09 16:01 ` Christoph Hellwig
2017-08-09 16:50 ` Paolo Bonzini
2017-08-10 12:22 ` Richard W.M. Jones
2017-08-10 12:53 ` Paolo Bonzini
2017-08-10 14:16 ` Richard W.M. Jones
2017-08-10 14:30 ` Paolo Bonzini
2017-08-10 15:40 ` Richard W.M. Jones
2017-08-10 16:04 ` Paolo Bonzini
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=20170807122701.GH20914@redhat.com \
--to=rjones@redhat.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=pbonzini@redhat.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.