All of lore.kernel.org
 help / color / mirror / Atom feed
* [virtio-dev] Slow access using virtio : Ramblock device
@ 2018-05-02 19:42 Radhesh Krishnan K
  2018-05-03  6:46 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Radhesh Krishnan K @ 2018-05-02 19:42 UTC (permalink / raw)
  To: virtio-dev

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

Hi Everyone,


I am attaching a ramblock device to the guest machine as a
normal block device and trying to write from the guest machine
to host's ramblock device. Block device is attached using Virtio
using following command:

``` qemu-system-x86_64 -enable-kvm  -machine type=pc,accel=kvm -cpu host
smp 1 -nographic  -k de  -m 1024  ubuntu16.04.qcow2  -drive
if=none,id=drive0,file=/dev/ram -device  virtio-blk
pci,physical_block_size=4096,logical_block_size=4096,drive=drive0```

Looks like these writes from Guest to host's RAM using Virtio is very slow
(slow like writing to a SSD).  What could be the reason for that?  Does a
write  on a virtualized blkdev will result in a VMEXIT? If not, does it
will be
"zero-copy"?  What am I missing here? Any pointers on this is greatly
appreciated.
Thanks in advance.




Regards,
Radhesh Krishnan K.

[-- Attachment #2: Type: text/html, Size: 2349 bytes --]

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

* Re: [virtio-dev] Slow access using virtio : Ramblock device
  2018-05-02 19:42 [virtio-dev] Slow access using virtio : Ramblock device Radhesh Krishnan K
@ 2018-05-03  6:46 ` David Hildenbrand
  0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2018-05-03  6:46 UTC (permalink / raw)
  To: Radhesh Krishnan K, virtio-dev

On 02.05.2018 21:42, Radhesh Krishnan K wrote:
> Hi Everyone,
> 
> 
> I am attaching a ramblock device to the guest machine as a 
> normal block device and trying to write from the guest machine 
> to host's ramblock device. Block device is attached using Virtio 
> using following command:
> 
> ``` qemu-system-x86_64 -enable-kvm  -machine type=pc,accel=kvm -cpu host
> smp 1 -nographic  -k de  -m 1024  ubuntu16.04.qcow2  -drive
> if=none,id=drive0,file=/dev/ram -device  virtio-blk
> pci,physical_block_size=4096,logical_block_size=4096,drive=drive0```
> 
> Looks like these writes from Guest to host's RAM using Virtio is very slow 
> (slow like writing to a SSD).  What could be the reason for that?  Does a 
> write  on a virtualized blkdev will result in a VMEXIT? If not, does it
> will be 

Hi,

Accesses to virtio-blk devices are always intercepted and processed by
QEMU (due to the virtio queue nature of these devices).

You might instead want to consider using an NVDIMM. There, the file is
directly mapped into guest physical address space and the guest can R/W
to it without intercepting to QEMU.


> "zero-copy"?  What am I missing here? Any pointers on this is greatly
> appreciated.
> Thanks in advance.
> 
> 
> 
>  
> Regards,
> Radhesh Krishnan K.


-- 

Thanks,

David / dhildenb

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


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

end of thread, other threads:[~2018-05-03  6:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 19:42 [virtio-dev] Slow access using virtio : Ramblock device Radhesh Krishnan K
2018-05-03  6:46 ` David Hildenbrand

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.