public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Increased memory usage with scsi-mq
@ 2017-08-04 21:00 Richard W.M. Jones
  2017-08-05  8:44 ` Christoph Hellwig
  0 siblings, 1 reply; 16+ messages in thread
From: Richard W.M. Jones @ 2017-08-04 21:00 UTC (permalink / raw)
  To: linux-scsi, linux-kernel; +Cc: Christoph Hellwig, Martin K. Petersen, pbonzini

https://bugzilla.redhat.com/show_bug.cgi?id=1478201

We have a libguestfs test which adds 256 virtio-scsi disks to a qemu
virtual machine.  The VM has 500 MB of RAM, 1 vCPU and no swap.

This test has been failing for a little while.  It runs out of memory
during SCSI enumeration in early boot.

Tonight I bisected the cause to:

  5c279bd9e40624f4ab6e688671026d6005b066fa is the first bad commit
  commit 5c279bd9e40624f4ab6e688671026d6005b066fa
  Author: Christoph Hellwig <hch@lst.de>
  Date:   Fri Jun 16 10:27:55 2017 +0200

    scsi: default to scsi-mq
    
    Remove the SCSI_MQ_DEFAULT config option and default to the blk-mq I/O
    path now that we had plenty of testing, and have I/O schedulers for
    blk-mq.  The module option to disable the blk-mq path is kept around for
    now.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

  :040000 040000 57ec7d5d2ba76592a695f533a69f747700c31966
  c79f6ecb070acc4fadf6fc05ca9ba32bc9c0c665 M	drivers

I also wrote a small test to see the maximum number of virtio-scsi
disks I could add to the above VM.  The results were very surprising
(to me anyhow):

  With scsi-mq enabled:   175 disks
  With scsi-mq disabled: 1755 disks

I don't know why the ratio is almost exactly 10 times.

I read your slides about scsi-mq and it seems like a significant
benefit to large machines, but could the out of the box defaults be
made more friendly for small memory machines?

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

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

end of thread, other threads:[~2017-08-10 16:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox