All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] poor virtio-scsi performance
@ 2015-06-08 10:30 Vasiliy Tolstov
  2015-06-08 12:50 ` Alexandre DERUMIER
  0 siblings, 1 reply; 9+ messages in thread
From: Vasiliy Tolstov @ 2015-06-08 10:30 UTC (permalink / raw)
  To: qemu-devel, libvir-list

Hi all!

I suspected poor performance of virtio-scsi driver.
I did a few tests:
   Host machine: linux 3.19.1, QEMU emulator version 2.3.0
   Guest machine: linux 4.0.4

   part of domain xml:
    <emulator>/usr/bin/kvm</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
      <source dev='/dev/ram0'/>
      <backingStore/>
      <target dev='sda' bus='scsi'/>
      <alias name='scsi0-0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>

/dev/ram0 I got by running `modprobe brd rd_size=$((5*1024*1024))` on
host machine.

fio conf:
  [readtest]
  blocksize=4k
  filename=/dev/sdb (/dev/ram0 whe test from host machine)
  rw=randread
  direct=1
  buffered=0
  ioengine=libaio
  iodepth=32


results:
  from host:
    bw=1594.6MB/s, iops=408196, clat=76usec
  from guest:
    bw=398MB/s, iops=99720, clat=316usec

Both host and guest system I boot with `scsi_mod.use_blk_mq=Y`.

Why difference in 4 times?!

-- 
Vasiliy Tolstov,
e-mail: v.tolstov@selfip.ru

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

* Re: [Qemu-devel] poor virtio-scsi performance
  2015-06-08 10:30 [Qemu-devel] poor virtio-scsi performance Vasiliy Tolstov
@ 2015-06-08 12:50 ` Alexandre DERUMIER
  0 siblings, 0 replies; 9+ messages in thread
From: Alexandre DERUMIER @ 2015-06-08 12:50 UTC (permalink / raw)
  To: Vasiliy Tolstov; +Cc: libvir-list, qemu-devel

Hi,
if you want to use multiqueues in guest, you need to enabled it on virtio-scsi controller.

<controller type='scsi' index='0' model='virtio-scsi' num_queues='8'/>

for example.


----- Mail original -----
De: "Vasiliy Tolstov" <v.tolstov@selfip.ru>
À: "qemu-devel" <qemu-devel@nongnu.org>, libvir-list@redhat.com
Envoyé: Lundi 8 Juin 2015 12:30:59
Objet: [Qemu-devel] poor virtio-scsi performance

Hi all! 

I suspected poor performance of virtio-scsi driver. 
I did a few tests: 
Host machine: linux 3.19.1, QEMU emulator version 2.3.0 
Guest machine: linux 4.0.4 

part of domain xml: 
<emulator>/usr/bin/kvm</emulator> 
<disk type='block' device='disk'> 
<driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/> 
<source dev='/dev/ram0'/> 
<backingStore/> 
<target dev='sda' bus='scsi'/> 
<alias name='scsi0-0-0-1'/> 
<address type='drive' controller='0' bus='0' target='0' unit='1'/> 
</disk> 

/dev/ram0 I got by running `modprobe brd rd_size=$((5*1024*1024))` on 
host machine. 

fio conf: 
[readtest] 
blocksize=4k 
filename=/dev/sdb (/dev/ram0 whe test from host machine) 
rw=randread 
direct=1 
buffered=0 
ioengine=libaio 
iodepth=32 


results: 
from host: 
bw=1594.6MB/s, iops=408196, clat=76usec 
from guest: 
bw=398MB/s, iops=99720, clat=316usec 

Both host and guest system I boot with `scsi_mod.use_blk_mq=Y`. 

Why difference in 4 times?! 

-- 
Vasiliy Tolstov, 
e-mail: v.tolstov@selfip.ru 

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

* Re: [Qemu-devel] poor virtio-scsi performance
  2015-06-08 14:00     ` Vasiliy Tolstov
@ 2015-06-08 14:01       ` Paolo Bonzini
  0 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2015-06-08 14:01 UTC (permalink / raw)
  To: Vasiliy Tolstov; +Cc: Andrey Korolyov, Alexey, qemu-devel



On 08/06/2015 16:00, Vasiliy Tolstov wrote:
> 2015-06-08 16:46 GMT+03:00 Paolo Bonzini <pbonzini@redhat.com>:
>> > virtio-scsi dataplane is not yet 100% thread-safe, but in practice it
>> > should work in 2.3+.  It's definitely good enough for benchmarking.
> 
> Minimal qemu version is 2.3 or something from git?

2.3

> Also how can i enable dataplane ?

Replace "-device virtio-scsi-pci" with "-object iothread,id=io1 -device
virtio-scsi-pci,iothread=io1".

Paolo

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

* Re: [Qemu-devel] poor virtio-scsi performance
  2015-06-08 13:46   ` Paolo Bonzini
@ 2015-06-08 14:00     ` Vasiliy Tolstov
  2015-06-08 14:01       ` Paolo Bonzini
  0 siblings, 1 reply; 9+ messages in thread
From: Vasiliy Tolstov @ 2015-06-08 14:00 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Andrey Korolyov, Alexey, qemu-devel

2015-06-08 16:46 GMT+03:00 Paolo Bonzini <pbonzini@redhat.com>:
> virtio-scsi dataplane is not yet 100% thread-safe, but in practice it
> should work in 2.3+.  It's definitely good enough for benchmarking.


Minimal qemu version is 2.3 or something from git?
Also how can i enable dataplane ?

-- 
Vasiliy Tolstov,
e-mail: v.tolstov@selfip.ru

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

* Re: [Qemu-devel] poor virtio-scsi performance
  2015-06-08 13:10 ` Andrey Korolyov
  2015-06-08 13:46   ` Paolo Bonzini
@ 2015-06-08 13:51   ` Vasiliy Tolstov
  1 sibling, 0 replies; 9+ messages in thread
From: Vasiliy Tolstov @ 2015-06-08 13:51 UTC (permalink / raw)
  To: Andrey Korolyov; +Cc: Alexey, qemu-devel

2015-06-08 16:10 GMT+03:00 Andrey Korolyov <andrey@xdel.ru>:
> You are probably hitting the (more or less fundamental) ceiling which
> was the reason for introducing dataplane backend recently, in other
> words, it does not matter how fast your backend is, the operation
> number will be limited by 50..100kIOPS without dataplane. As far as I
> remember the recent development made possible using it with
> virtio-scsi as well as with virtio-blk, so you`d possibly want to try
> it.


I can't find dataplane for virtio-scsi, only for virtio-blk.

-- 
Vasiliy Tolstov,
e-mail: v.tolstov@selfip.ru

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

* Re: [Qemu-devel] poor virtio-scsi performance
  2015-06-08 13:10 ` Andrey Korolyov
@ 2015-06-08 13:46   ` Paolo Bonzini
  2015-06-08 14:00     ` Vasiliy Tolstov
  2015-06-08 13:51   ` Vasiliy Tolstov
  1 sibling, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2015-06-08 13:46 UTC (permalink / raw)
  To: Andrey Korolyov, Alexey; +Cc: qemu-devel



On 08/06/2015 15:10, Andrey Korolyov wrote:
> 
> You are probably hitting the (more or less fundamental) ceiling which
> was the reason for introducing dataplane backend recently, in other
> words, it does not matter how fast your backend is, the operation
> number will be limited by 50..100kIOPS without dataplane. As far as I
> remember the recent development made possible using it with
> virtio-scsi as well as with virtio-blk, so you`d possibly want to try
> it.

virtio-scsi dataplane is not yet 100% thread-safe, but in practice it
should work in 2.3+.  It's definitely good enough for benchmarking.

Paolo

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

* Re: [Qemu-devel] poor virtio-scsi performance
  2015-06-08  9:52 Alexey
@ 2015-06-08 13:10 ` Andrey Korolyov
  2015-06-08 13:46   ` Paolo Bonzini
  2015-06-08 13:51   ` Vasiliy Tolstov
  0 siblings, 2 replies; 9+ messages in thread
From: Andrey Korolyov @ 2015-06-08 13:10 UTC (permalink / raw)
  To: Alexey; +Cc: qemu-devel

On Mon, Jun 8, 2015 at 12:52 PM, Alexey <alukardd@alukardd.org> wrote:
> Hi all!
>
> I suspected poor performance of virtio-scsi driver.
> I did a few tests:
>    Host machine: linux 3.19.1, QEMU emulator version 2.3.0
>    Guest machine: linux 4.0.4
>
>    part of domain xml:
>     <emulator>/usr/bin/kvm</emulator>
>     <disk type='block' device='disk'>
>       <driver name='qemu' type='raw' cache='none' io='native'
> discard='unmap'/>
>       <source dev='/dev/ram0'/>
>       <backingStore/>
>       <target dev='sda' bus='scsi'/>
>       <alias name='scsi0-0-0-1'/>
>       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
>     </disk>
>
> /dev/ram0 I got by running `modprobe brd rd_size=$((5*1024*1024))` on host
> machine.
>
> fio conf:
>   [readtest]
>   blocksize=4k
>   filename=/dev/sdb (/dev/ram0 whe test from host machine)
>   rw=randread
>   direct=1
>   buffered=0
>   ioengine=libaio
>   iodepth=32
>
>
> results:
>   from host:
>     bw=1594.6MB/s, iops=408196, clat=76usec
>   from guest:
>     bw=398MB/s, iops=99720, clat=316usec
>
> Both host and guest system I boot with `scsi_mod.use_blk_mq=Y`.
>
> Why difference in 4 times?!
>
>
> Regards,
> Alexey Mochkin
>


You are probably hitting the (more or less fundamental) ceiling which
was the reason for introducing dataplane backend recently, in other
words, it does not matter how fast your backend is, the operation
number will be limited by 50..100kIOPS without dataplane. As far as I
remember the recent development made possible using it with
virtio-scsi as well as with virtio-blk, so you`d possibly want to try
it.

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

* [Qemu-devel] poor virtio-scsi performance
@ 2015-06-08 10:13 Alexey
  0 siblings, 0 replies; 9+ messages in thread
From: Alexey @ 2015-06-08 10:13 UTC (permalink / raw)
  To: qemu-devel

Hi all!

I suspected poor performance of virtio-scsi driver.
I did a few tests:
    Host machine: linux 3.19.1, QEMU emulator version 2.3.0
    Guest machine: linux 4.0.4

    part of domain xml:
     <emulator>/usr/bin/kvm</emulator>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native' 
discard='unmap'/>
       <source dev='/dev/ram0'/>
       <backingStore/>
       <target dev='sda' bus='scsi'/>
       <alias name='scsi0-0-0-1'/>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>

/dev/ram0 I got by running `modprobe brd rd_size=$((5*1024*1024))` on 
host machine.

fio conf:
   [readtest]
   blocksize=4k
   filename=/dev/sdb (/dev/ram0 whe test from host machine)
   rw=randread
   direct=1
   buffered=0
   ioengine=libaio
   iodepth=32


results:
   from host:
     bw=1594.6MB/s, iops=408196, clat=76usec
   from guest:
     bw=398MB/s, iops=99720, clat=316usec

Both host and guest system I boot with `scsi_mod.use_blk_mq=Y`.

Why difference in 4 times?!


Regards,
Alexey Mochkin

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

* [Qemu-devel] poor virtio-scsi performance
@ 2015-06-08  9:52 Alexey
  2015-06-08 13:10 ` Andrey Korolyov
  0 siblings, 1 reply; 9+ messages in thread
From: Alexey @ 2015-06-08  9:52 UTC (permalink / raw)
  To: qemu-devel

Hi all!

I suspected poor performance of virtio-scsi driver.
I did a few tests:
    Host machine: linux 3.19.1, QEMU emulator version 2.3.0
    Guest machine: linux 4.0.4

    part of domain xml:
     <emulator>/usr/bin/kvm</emulator>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native' 
discard='unmap'/>
       <source dev='/dev/ram0'/>
       <backingStore/>
       <target dev='sda' bus='scsi'/>
       <alias name='scsi0-0-0-1'/>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>

/dev/ram0 I got by running `modprobe brd rd_size=$((5*1024*1024))` on 
host machine.

fio conf:
   [readtest]
   blocksize=4k
   filename=/dev/sdb (/dev/ram0 whe test from host machine)
   rw=randread
   direct=1
   buffered=0
   ioengine=libaio
   iodepth=32


results:
   from host:
     bw=1594.6MB/s, iops=408196, clat=76usec
   from guest:
     bw=398MB/s, iops=99720, clat=316usec

Both host and guest system I boot with `scsi_mod.use_blk_mq=Y`.

Why difference in 4 times?!


Regards,
Alexey Mochkin

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

end of thread, other threads:[~2015-06-08 14:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-08 10:30 [Qemu-devel] poor virtio-scsi performance Vasiliy Tolstov
2015-06-08 12:50 ` Alexandre DERUMIER
  -- strict thread matches above, loose matches on Subject: below --
2015-06-08 10:13 Alexey
2015-06-08  9:52 Alexey
2015-06-08 13:10 ` Andrey Korolyov
2015-06-08 13:46   ` Paolo Bonzini
2015-06-08 14:00     ` Vasiliy Tolstov
2015-06-08 14:01       ` Paolo Bonzini
2015-06-08 13:51   ` Vasiliy Tolstov

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.