VirtIO-blk

Here you can provide suggestions on how to improve the product, website, etc.

VirtIO-blk

Postby Uzume » 13. May 2010, 00:16

http://forums.virtualbox.org/viewtopic.php?p=137038#p137038
Technologov wrote:You can open VirtIO-blk thread in "Suggestions" forum, and drop a link here... plus provide performance numbers if you can...


Are there plans to include a paravirtualized virtio storage controller such as QEMU has? I know there are Windows (and probably Linux) drivers for such and virtio is already integrated since there is a virtio network controller in vbox now.

@Technologov: I am uncertain how to provide any performance numbers since vbox currently does not support such (so it would be hard to get any performance numbers on vbox without writing the device itself).
Uzume
 
Posts: 71
Joined: 9. Sep 2009, 21:10
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: MS Windows 2003, PureDarwin

Re: VirtIO-blk

Postby sej7278 » 13. May 2010, 09:06

some basic benchmarks at the bottom of this page point to virtio-blk being twice as fast as ide emulation, not sure how it compares to sata emulation:

http://www.carfax.org.uk/docs/qemu-virtio

i'd be pretty interested in this, moreso than virtio-net
sej7278
Volunteer
 
Posts: 665
Joined: 5. Sep 2008, 14:40
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Solaris 10u8, FreeBSD 4.11, Ubuntu 9.04/9.10, RHEL 5u5/4u8, Windows 2003/XP/7, eCS2rc5

Re: VirtIO-blk

Postby Uzume » 14. May 2010, 15:14

Thanks for the benchmarks.

Here is another vote for virtio-block: viewtopic.php?p=137181#p137181
Uzume
 
Posts: 71
Joined: 9. Sep 2009, 21:10
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: MS Windows 2003, PureDarwin

Re: VirtIO-blk

Postby liangsuilong » 25. May 2010, 09:24

I am also quite insterested in virtio-block. And I can feel the disk performance of virtualbox is not enough fast.
liangsuilong
 
Posts: 38
Joined: 19. Jun 2009, 14:34
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Ubuntu, Windows XP, Fedora Rawhide

Re: VirtIO-blk

Postby Technologov » 26. May 2010, 14:17

We need more benchmarks:
1. VirtualBox with IDE
2. VirtualBox with SATA
3. VirtualBox with SCSI

4. Qemu/KVM with IDE
5. Qemu/KVM with SCSI
6. Qemu/KVM with VirtIO-blk

I think we need to test with "host I/O cache" enabled... (this will allow comparison to Qemu, because Qemu always has it enabled AFAIK)
Technologov
Site Moderator
 
Posts: 1742
Joined: 10. May 2007, 16:59
Location: Israel

Re: VirtIO-blk

Postby sej7278 » 26. May 2010, 17:07

i don't think we need benchmarks, we already know that virtio-blk will be faster than anything currently in virtualbox by its very nature (like virtio-net). virtualisation and benchmarks really is not reliable.
sej7278
Volunteer
 
Posts: 665
Joined: 5. Sep 2008, 14:40
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Solaris 10u8, FreeBSD 4.11, Ubuntu 9.04/9.10, RHEL 5u5/4u8, Windows 2003/XP/7, eCS2rc5

Re: VirtIO-blk

Postby liangsuilong » 26. May 2010, 17:23

Technologov wrote:We need more benchmarks:
1. VirtualBox with IDE
2. VirtualBox with SATA
3. VirtualBox with SCSI

4. Qemu/KVM with IDE
5. Qemu/KVM with SCSI
6. Qemu/KVM with VirtIO-blk

I think we need to test with "host I/O cache" enabled... (this will allow comparison to Qemu, because Qemu always has it enabled AFAIK)


I want to test it. But I feel that benchmark in virtualizer is inaccurate. For example, read rate of gnome-disk-utility in virtualbox is maybe more than 1GB/s.

OK. If I test it, which virtual disk formats should I choose, qcow2 or raw?
liangsuilong
 
Posts: 38
Joined: 19. Jun 2009, 14:34
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Ubuntu, Windows XP, Fedora Rawhide

Re: VirtIO-blk

Postby Technologov » 26. May 2010, 17:24

You can test using hand watch... so VM timing won't matter.
Technologov
Site Moderator
 
Posts: 1742
Joined: 10. May 2007, 16:59
Location: Israel

Re: VirtIO-blk

Postby aeichner » 26. May 2010, 20:18

I don't know if virtio-blk brings any performance benefit compared to the SATA, SCSI or the SAS controllers VirtualBox currently offers. As far as I understand it virtio-blk only provides a low overhead queue for requests from the guest.
The reason why IDE has such a bad I/O performance especially when doing lots of small reads and write which happen during a kernel compile is the high virtualization overhead.
Setting up a request for IDE requires a lot of writes to the registers of the IDE controller causing a huge amount of VM exits. These exits are quite expensive.
Furthermore IDE allows only one active request at the same time which results in higher overhead in the hypervisor and guest when processing interrupts.

This is completely different with the other controllers. The guest has to do only 1 register write to enqueue a request to the controller which reduces the number of VM exits significantly. It is also possible to queue many requests and to coalesce completed requests reducing the amount of time spent in interrupt handling.
aeichner
Oracle Corporation
 
Posts: 67
Joined: 31. Aug 2007, 19:12

Re: VirtIO-blk

Postby liangsuilong » 28. May 2010, 07:00

I have finished big files copying test. I feel the result is unbelievable. This is not a professional test but many users will focus on this point.

My test result:
https://docs.google.com/fileview?id=0B6uJ1YpVaG2EMTNjNGU1NWUtMjRjNy00MDZmLTk3M2ItZDMyNTVjMjU0YTkx&hl=en

A year ago, phoronix also tested KVM and VirtualBox:
http://www.phoronix.com/scan.php?page=article&item=intel_corei7_virt&num=1
liangsuilong
 
Posts: 38
Joined: 19. Jun 2009, 14:34
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Ubuntu, Windows XP, Fedora Rawhide

Re: VirtIO-blk

Postby Technologov » 28. May 2010, 08:36

How could you test "Qemu-kvm-0.12.3, vdi format disk" ?

Apart from this it looks like an upgrade IDE->SATA (VBox), and IDE->VirtIO-blk (Qemu/KVM) in both virtualizers produces 25% increase in performance.

But I will make an effort to benchmark too... I will probably use hand watch for timing.
Technologov
Site Moderator
 
Posts: 1742
Joined: 10. May 2007, 16:59
Location: Israel

Re: VirtIO-blk

Postby sej7278 » 28. May 2010, 09:20

it looks like you've benchmarked inside the guest, which makes the timings all a bit irrelevant - virtioblk has less processor overhead so would give faster timings in the guest even if it wasn't actually faster.
sej7278
Volunteer
 
Posts: 665
Joined: 5. Sep 2008, 14:40
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Solaris 10u8, FreeBSD 4.11, Ubuntu 9.04/9.10, RHEL 5u5/4u8, Windows 2003/XP/7, eCS2rc5

Re: VirtIO-blk

Postby Technologov » 29. May 2010, 10:42

I done some benchmarks too... (Disk I/O)
viewtopic.php?f=3&t=31465

Your KVM and VirtualBox images should be on same partitions,
in case you use several HDDs or filesystems.

1. download linux-2.6.18.tar.bz2
2. # tar xvf linux-2.6.18
3. # make defconfig
-- Start timer (I use handwatch)
4. # make
-- stop timer

Host: Mandriva Linux 2010, x64, Core 2 Q6600, VBox 3.2.0
Guest: RHEL 5, x64, 1 CPU, SATA + Host I/O cache
kernel compile time: 12:20

Guest: RHEL 5, x64, 1 CPU, IDE + Host I/O cache
kernel compile time: 12:15

In other words, I got the same speed from IDE and SATA.

-----------------
Qemu/KVM

Host: Mandriva Linux 2010, x64, Core 2 Q6600, Qemu/KVM v0.11.0 (default with Mandriva 2010)

Guest: RHEL 5, x64, 1 CPU, SCSI
Guest OS Install failure. (Qemu bug?):
lsi_scsi: error: Unimplemented message 0x0c

Guest: RHEL 5, x64, 1 CPU, VirtIO-blk
kernel compile time: 10:20

Guest: RHEL 5, x64, 1 CPU, IDE
kernel compile time: 8:56

For me IDE was even faster than other solutions... dunno why...

-Technologov
Technologov
Site Moderator
 
Posts: 1742
Joined: 10. May 2007, 16:59
Location: Israel

Re: VirtIO-blk

Postby mpack » 29. May 2010, 11:25

Technologov wrote:Guest: RHEL 5, x64, 1 CPU, VirtIO-blk
kernel compile time: 10:20

Guest: RHEL 5, x64, 1 CPU, IDE
kernel compile time: 8:56

For me IDE was even faster than other solutions... dunno why...

Did you take account of disk caching on the host? I.e. you need to reset the host to be sure it hasn't cached any of the data being read by the VMs, especially if the intention is to benchmark an I/O bound process.

Note however that even if this were true, it implies that physical I/O times - at least on your host - dwarfs any distinctions between IDE, SATA and VirtIO-blk.
mpack
Volunteer
 
Posts: 2197
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtIO-blk

Postby liangsuilong » 29. May 2010, 11:33

Technologov wrote:How could you test "Qemu-kvm-0.12.3, vdi format disk" ?

Apart from this it looks like an upgrade IDE->SATA (VBox), and IDE->VirtIO-blk (Qemu/KVM) in both virtualizers produces 25% increase in performance.

But I will make an effort to benchmark too... I will probably use hand watch for timing.


It is quite easy. virt-manager allows user to add a vdi file connecting to the VM, just like raw and qcow2.

According to aeichner and sej7278, virtio-blk has less processor overhead and is good at small files reading and writing.

At last, thank you for your benchmark.
liangsuilong
 
Posts: 38
Joined: 19. Jun 2009, 14:34
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Ubuntu, Windows XP, Fedora Rawhide

Next

Return to Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest