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


Groups > linux.debian.user > #178057 > unrolled thread

virtual disks perfermonca <=2MB/s

Started byMimiko <vbvbrj@gmail.com>
First post2017-02-22 09:20 +0100
Last post2017-02-22 15:50 +0100
Articles 5 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  virtual disks perfermonca <=2MB/s Mimiko <vbvbrj@gmail.com> - 2017-02-22 09:20 +0100
    Re: virtual disks perfermonca <=2MB/s Joel Wirāmu Pauling <joel@aenertia.net> - 2017-02-22 09:50 +0100
      Re: virtual disks perfermonca <=2MB/s Mimiko <vbvbrj@gmail.com> - 2017-02-22 14:00 +0100
    Re: virtual disks perfermonca <=2MB/s Darac Marjal <mailinglist@darac.org.uk> - 2017-02-22 15:10 +0100
      Re: virtual disks perfermonca <=2MB/s Mimiko <vbvbrj@gmail.com> - 2017-02-22 15:50 +0100

#178057 — virtual disks perfermonca <=2MB/s

FromMimiko <vbvbrj@gmail.com>
Date2017-02-22 09:20 +0100
Subjectvirtual disks perfermonca <=2MB/s
Message-ID<tdAjv-78i-3@gated-at.bofh.it>
Hello.

I already wrote to qemu mail list and didn't find an answer.

I've setup qemu / kvm on Debian Wheezy to host some Debian Jessie guests.
I create disk like this:

virsh vol-create-as --pool default --name root.vhd --capacity 50G --format vpc

Then create a virtual with this:
virt-install --connect qemu:///system \
--ram 2048 \
--vcpus=4 \
--cpuset=auto \
--pxe \
--os-type linux \
--boot network,hd,menu=on \
--disk vol=default/root.vhd,device=disk,bus=virtio,cache=writethrough \
--network=bridge:br0,model=virtio \
--noautoconsole \
--hvm \
--autostart \
--check-cpu

After setting up the system I've got poor disk performance.
Using

time dd if=/dev/zero of=/tmp/test oflag=direct bs=64k count=16000

I get 1048576000 bytes (1.0 GB) copied, 397.473 s, 2.6 MB/s

I've changed cache to writeback and got 20MB/s with this test. But copying a file to this virtual using samba gives me no more of 2 MB/s.

I've tested network connectivity with iperf and got around 750Mbit/s, which I think is satisfactory.

I will not want to use raw devices, as it is not self expanded and will use whole space regardless of how much real data occupy.

libvirtd (libvirt) 0.9.12.3

Is there a way to increase disk speed to at least 50MB/s ?

As suggested by other to test:

I've created a raw disk of 10GB and attached to VM and mounted it. The speed is same - 2MB.
As per same cifs/samba access to / on the host - the speed is 180MB+, as there are 2 network interfaces in alb bond.

 > time dd if=/dev/zero of=/vdisks/test oflag=direct bs=64k count=16000
16000+0 records in
16000+0 records out
1048576000 bytes (1.0 GB) copied, 0.970587 s, 1.1 GB/s

real    0m0.972s
user    0m0.008s
sys     0m0.856s

/vdisks reside on a raidz2 zfs pool via PCI-E hardware raid used in IT mode to allow ZFS software raid.

 > /usr/bin/kvm --version
QEMU emulator version 1.1.2 (qemu-kvm-1.1.2+dfsg-6+deb7u19, Debian), Copyright (c) 2003-2008 Fabrice Bellard

 > virsh dumpxml YOURVMNAME > tmp.xml
<domain type='kvm' id='10'>
   <name>srv</name>
   <uuid>c23810c8-fe96-12df-5769-5a7a80c3c35f</uuid>
   <memory unit='KiB'>2097152</memory>
   <currentMemory unit='KiB'>2097152</currentMemory>
   <vcpu placement='static'>4</vcpu>
   <os>
     <type arch='x86_64' machine='pc-1.1'>hvm</type>
     <boot dev='hd'/>
     <boot dev='network'/>
     <bootmenu enable='yes'/>
   </os>
   <features>
     <acpi/>
     <apic/>
     <pae/>
   </features>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/kvm</emulator>
     <disk type='file' device='disk'>
       <driver name='qemu' type='vpc' cache='writeback'/>
       <source file='/vdisks/root.vhd'/>
       <target dev='vda' bus='virtio'/>
       <alias name='virtio-disk0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </disk>
     <controller type='usb' index='0'>
       <alias name='usb0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <interface type='bridge'>
       <mac address='52:54:00:de:83:2d'/>
       <source bridge='br0'/>
       <target dev='vnet0'/>
       <model type='virtio'/>
       <alias name='net0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </interface>
     <serial type='pty'>
       <source path='/dev/pts/4'/>
       <target port='0'/>
       <alias name='serial0'/>
     </serial>
     <console type='pty' tty='/dev/pts/4'>
       <source path='/dev/pts/4'/>
       <target type='serial' port='0'/>
       <alias name='serial0'/>
     </console>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='59081' autoport='no' listen='0.0.0.0'>
       <listen type='address' address='0.0.0.0'/>
     </graphics>
     <video>
       <model type='cirrus' vram='9216' heads='1'/>
       <alias name='video0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </video>
     <memballoon model='virtio'>
       <alias name='balloon0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
     </memballoon>
   </devices>
   <seclabel type='none'/>
</domain>

Any help please.

[toc] | [next] | [standalone]


#178060

FromJoel Wirāmu Pauling <joel@aenertia.net>
Date2017-02-22 09:50 +0100
Message-ID<tdAMy-7pX-3@gated-at.bofh.it>
In reply to#178057

[Multipart message — attachments visible in raw view] — view raw

Why are you using vhd instead of qcow2? I would wager it's a combination of
the vhd format having some bug. Try with qcow2 first.

On 22 February 2017 at 21:17, Mimiko <vbvbrj@gmail.com> wrote:

> Hello.
>
> I already wrote to qemu mail list and didn't find an answer.
>
> I've setup qemu / kvm on Debian Wheezy to host some Debian Jessie guests.
> I create disk like this:
>
> virsh vol-create-as --pool default --name root.vhd --capacity 50G --format
> vpc
>
> Then create a virtual with this:
> virt-install --connect qemu:///system \
> --ram 2048 \
> --vcpus=4 \
> --cpuset=auto \
> --pxe \
> --os-type linux \
> --boot network,hd,menu=on \
> --disk vol=default/root.vhd,device=disk,bus=virtio,cache=writethrough \
> --network=bridge:br0,model=virtio \
> --noautoconsole \
> --hvm \
> --autostart \
> --check-cpu
>
> After setting up the system I've got poor disk performance.
> Using
>
> time dd if=/dev/zero of=/tmp/test oflag=direct bs=64k count=16000
>
> I get 1048576000 bytes (1.0 GB) copied, 397.473 s, 2.6 MB/s
>
> I've changed cache to writeback and got 20MB/s with this test. But copying
> a file to this virtual using samba gives me no more of 2 MB/s.
>
> I've tested network connectivity with iperf and got around 750Mbit/s,
> which I think is satisfactory.
>
> I will not want to use raw devices, as it is not self expanded and will
> use whole space regardless of how much real data occupy.
>
> libvirtd (libvirt) 0.9.12.3
>
> Is there a way to increase disk speed to at least 50MB/s ?
>
> As suggested by other to test:
>
> I've created a raw disk of 10GB and attached to VM and mounted it. The
> speed is same - 2MB.
> As per same cifs/samba access to / on the host - the speed is 180MB+, as
> there are 2 network interfaces in alb bond.
>
> > time dd if=/dev/zero of=/vdisks/test oflag=direct bs=64k count=16000
> 16000+0 records in
> 16000+0 records out
> 1048576000 bytes (1.0 GB) copied, 0.970587 s, 1.1 GB/s
>
> real    0m0.972s
> user    0m0.008s
> sys     0m0.856s
>
> /vdisks reside on a raidz2 zfs pool via PCI-E hardware raid used in IT
> mode to allow ZFS software raid.
>
> > /usr/bin/kvm --version
> QEMU emulator version 1.1.2 (qemu-kvm-1.1.2+dfsg-6+deb7u19, Debian),
> Copyright (c) 2003-2008 Fabrice Bellard
>
> > virsh dumpxml YOURVMNAME > tmp.xml
> <domain type='kvm' id='10'>
>   <name>srv</name>
>   <uuid>c23810c8-fe96-12df-5769-5a7a80c3c35f</uuid>
>   <memory unit='KiB'>2097152</memory>
>   <currentMemory unit='KiB'>2097152</currentMemory>
>   <vcpu placement='static'>4</vcpu>
>   <os>
>     <type arch='x86_64' machine='pc-1.1'>hvm</type>
>     <boot dev='hd'/>
>     <boot dev='network'/>
>     <bootmenu enable='yes'/>
>   </os>
>   <features>
>     <acpi/>
>     <apic/>
>     <pae/>
>   </features>
>   <clock offset='utc'/>
>   <on_poweroff>destroy</on_poweroff>
>   <on_reboot>restart</on_reboot>
>   <on_crash>restart</on_crash>
>   <devices>
>     <emulator>/usr/bin/kvm</emulator>
>     <disk type='file' device='disk'>
>       <driver name='qemu' type='vpc' cache='writeback'/>
>       <source file='/vdisks/root.vhd'/>
>       <target dev='vda' bus='virtio'/>
>       <alias name='virtio-disk0'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
> function='0x0'/>
>     </disk>
>     <controller type='usb' index='0'>
>       <alias name='usb0'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x2'/>
>     </controller>
>     <interface type='bridge'>
>       <mac address='52:54:00:de:83:2d'/>
>       <source bridge='br0'/>
>       <target dev='vnet0'/>
>       <model type='virtio'/>
>       <alias name='net0'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>     </interface>
>     <serial type='pty'>
>       <source path='/dev/pts/4'/>
>       <target port='0'/>
>       <alias name='serial0'/>
>     </serial>
>     <console type='pty' tty='/dev/pts/4'>
>       <source path='/dev/pts/4'/>
>       <target type='serial' port='0'/>
>       <alias name='serial0'/>
>     </console>
>     <input type='mouse' bus='ps2'/>
>     <graphics type='vnc' port='59081' autoport='no' listen='0.0.0.0'>
>       <listen type='address' address='0.0.0.0'/>
>     </graphics>
>     <video>
>       <model type='cirrus' vram='9216' heads='1'/>
>       <alias name='video0'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
> function='0x0'/>
>     </video>
>     <memballoon model='virtio'>
>       <alias name='balloon0'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x08'
> function='0x0'/>
>     </memballoon>
>   </devices>
>   <seclabel type='none'/>
> </domain>
>
> Any help please.
>
>

[toc] | [prev] | [next] | [standalone]


#178063

FromMimiko <vbvbrj@gmail.com>
Date2017-02-22 14:00 +0100
Message-ID<tdEGu-1Nw-11@gated-at.bofh.it>
In reply to#178060
On 22.02.2017 10:40, Joel Wirāmu Pauling wrote:
> Why are you using vhd instead of qcow2? I would wager it's a combination of the vhd format having some bug. Try with qcow2 first.


I tried and the write speed is the same.

[toc] | [prev] | [next] | [standalone]


#178065

FromDarac Marjal <mailinglist@darac.org.uk>
Date2017-02-22 15:10 +0100
Message-ID<tdFMe-2OX-17@gated-at.bofh.it>
In reply to#178057
On Wed, Feb 22, 2017 at 10:17:01AM +0200, Mimiko wrote:
>Hello.
>
>I already wrote to qemu mail list and didn't find an answer.
>
>I've setup qemu / kvm on Debian Wheezy to host some Debian Jessie guests.
>I create disk like this:
>
>virsh vol-create-as --pool default --name root.vhd --capacity 50G --format vpc
>
>Then create a virtual with this:
>virt-install --connect qemu:///system \
>--ram 2048 \
>--vcpus=4 \
>--cpuset=auto \
>--pxe \
>--os-type linux \
>--boot network,hd,menu=on \
>--disk vol=default/root.vhd,device=disk,bus=virtio,cache=writethrough \
>--network=bridge:br0,model=virtio \
>--noautoconsole \
>--hvm \
>--autostart \
>--check-cpu
>
>After setting up the system I've got poor disk performance.
>Using
>
>time dd if=/dev/zero of=/tmp/test oflag=direct bs=64k count=16000
>
>I get 1048576000 bytes (1.0 GB) copied, 397.473 s, 2.6 MB/s
>
>I've changed cache to writeback and got 20MB/s with this test. But copying a file to this virtual using samba gives me no more of 2 MB/s.
>
>I've tested network connectivity with iperf and got around 750Mbit/s, which I think is satisfactory.
>
>I will not want to use raw devices, as it is not self expanded and will use whole space regardless of how much real data occupy.
>
>libvirtd (libvirt) 0.9.12.3
>
>Is there a way to increase disk speed to at least 50MB/s ?

StackExchange 
(http://serverfault.com/questions/407842/incredibly-slow-kvm-disk-performance-qcow2-disk-files-virtio) 
suggests that QCOW2 may be a factor, and to use:

 $ qemu-img create -f qcow2 -o preallocation=metadata,compat=1.1,lazy_refcounts=on imageXYZ

but there's a bunch of other cargo-cult options to try, too! :D


-- 
For more information, please reread.

[toc] | [prev] | [next] | [standalone]


#178070

FromMimiko <vbvbrj@gmail.com>
Date2017-02-22 15:50 +0100
Message-ID<tdGoV-37i-15@gated-at.bofh.it>
In reply to#178065
On 22.02.2017 16:04, Darac Marjal wrote:
> StackExchange (http://serverfault.com/questions/407842/incredibly-slow-kvm-disk-performance-qcow2-disk-files-virtio) suggests that QCOW2 may be a
> factor, and to use:
>
> $ qemu-img create -f qcow2 -o preallocation=metadata,compat=1.1,lazy_refcounts=on imageXYZ
>
> but there's a bunch of other cargo-cult options to try, too! :D


I've read that thread. But I don't want to preallocate all space.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web