Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1705435

Re: Increased memory usage with scsi-mq

From "Richard W.M. Jones" <rjones@redhat.com>
Newsgroups linux.kernel
Subject Re: Increased memory usage with scsi-mq
Date 2017-08-07 14:30 +0200
Message-ID <ubPku-87B-19@gated-at.bofh.it> (permalink)
References (1 earlier) <ub2Wt-2Co-1@gated-at.bofh.it> <ub3zb-37T-7@gated-at.bofh.it> <ub7CN-5Dm-3@gated-at.bofh.it> <ub9EB-6UA-23@gated-at.bofh.it> <ubPaO-83T-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-04 23:10 +0200
  Re: Increased memory usage with scsi-mq Christoph Hellwig <hch@lst.de> - 2017-08-05 10:50 +0200
    Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-05 11:30 +0200
      Re: Increased memory usage with scsi-mq Christoph Hellwig <hch@lst.de> - 2017-08-05 15:50 +0200
        Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-05 18:00 +0200
          Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-07 14:20 +0200
            Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-07 14:30 +0200
              Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-07 15:10 +0200
                Re: Increased memory usage with scsi-mq Christoph Hellwig <hch@lst.de> - 2017-08-09 18:10 +0200
                Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-09 19:00 +0200
                Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-10 14:30 +0200
                Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-10 15:00 +0200
                Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-10 16:20 +0200
                Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-10 16:40 +0200
                Re: Increased memory usage with scsi-mq "Richard W.M. Jones" <rjones@redhat.com> - 2017-08-10 17:50 +0200
                Re: Increased memory usage with scsi-mq Paolo Bonzini <pbonzini@redhat.com> - 2017-08-10 18:10 +0200

csiph-web