Re: [Qemu-discuss] virtual disks perfermonca <=2MB/s
On 20.02.2017 18:45, Jakob Bohm wrote: Is /tmp/ the same drive (mount) as /vdisks/ ? Oh, really. /tmp is differen drive: an SSD mirror via MB sata 2 interface. 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 real0m0.972s user0m0.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. And it had 10x speed than SATA 2 :) -- Mimiko desu.
Re: [Qemu-discuss] virtual disks perfermonca <=2MB/s
On 20/02/2017 17:30, Mimiko wrote: On 20.02.2017 17:42, Vincenzo Romano wrote: I think you have to first check your barebones disk I/O throughput. If you mean running: time dd if=/dev/zero of=/tmp/test oflag=direct bs=64k count=16000 16000+0 records in 16000+0 records out 1048576000 bytes (1.0 GB) copied, 6.91783 s, 152 MB/s real0m6.932s user0m0.016s sys 0m0.656s on the host. Is /tmp/ the same drive (mount) as /vdisks/ ? Does anyone know of specific qemu+kvm virtio-blk-pci disk performance bugs that are large enough to explain this and were fixed between the (old) qemu version (1.1.2+dfsg-6+deb7u19) shipped a long time ago in Debian 7 (wheezy) and the current stable qemu? Enjoy Jakob -- Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10 This public discussion message is non-binding and may contain errors. WiseMo - Remote Service Management for PCs, Phones and Embedded
Re: [Qemu-discuss] virtual disks perfermonca <=2MB/s
On 20.02.2017 17:42, Vincenzo Romano wrote: I think you have to first check your barebones disk I/O throughput. If you mean running: time dd if=/dev/zero of=/tmp/test oflag=direct bs=64k count=16000 16000+0 records in 16000+0 records out 1048576000 bytes (1.0 GB) copied, 6.91783 s, 152 MB/s real0m6.932s user0m0.016s sys 0m0.656s on the host.
Re: [Qemu-discuss] virtual disks perfermonca <=2MB/s
I am glad I misunderstood your report! Someone else already suggested you to test "bare bones" disk I/O performances -- Vincenzo Romano - NotOrAnd.IT Information Technologies -- NON QVIETIS MARIBVS NAVTA PERITVS 2017-02-20 14:07 GMT+01:00 Mimiko : > On 20.02.2017 13:13, Vincenzo Romano wrote: >> >> I could be wrong, but are you willing to run a VM with a disk image >> over CIFS/SAMBA? >> If not, why are you quoting your network throughput? > > > No, I do not share a disk image via cifs/samba. This is a test machine, > mostly used for compiling, and I shared / folder to browse all files. Good. I am glad I misunderstood you. >> Could you please try (on a separate test VM) raw and qcow2? > > This VM was setup 2 days ago with latest Debian updates for Jessie. > I've created a raw disk of 10GB and attached to VM and mounted it. The speed > is same - 2MB. I think you have to first check your barebones disk I/O throughput. > As per same cifs/samba access to / on the host - the speed is 180MB+, as > there are 2 network interfaces in alb bond. No need to take into account your network unless you're killing your system with Gbps of sustained traffic. In that case maybe the I/O could lag a little bit. >> In understand your concerns about the disk space allocation, but if >> you create a virtual disk of 50GB, I think you'd know it could grow up >> to that size and that it won't automatically shrink back. > > This is my first attempt of a VM on qemu after a lot of years using Hyper-V > 2008 R2. > In Hyper-V I have little performance loose compared to direct host's disk > access, and virtual disks can be compacted using gui command. I think that > periodically I can recompact virtual disk using qemu/kvm/libvirt tools or > Hyper-V in case of vhc/vhd (theoretically, as I've never reached initial > limit, but I have chance to store more virtual disks for multiple VMs) Did you get the same I/O performances on the same hardware with Hyper-V? I suspect you are experiencing some hardware limitation: 2MBps is a very low score, unless the hardware is broken or really oldish. >> Please, elaborate more on your environment and objectives. > > It will be for compiling and testing. Thats why I mentioned that 50MB is ok. > > > On 20.02.2017 13:37, Jakob Bohm wrote: >> What does the same test return on the host (wheezy) machine on the same >> disk/partition as the vhd. > > The host can handle 180MB+ > >> Also, consider using the native qemu disk image format (qcow2) instead >> of the VHD format compatibility layer. > > I've tried raw and the speed is same. > >> virsh domxml-to-native qemu-argv tmp.xml > LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin > HOME=/ QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-1.1 -enable-kvm -m 2048 > -smp 4,sockets=4,cores=1,threads=1 -name srv -uuid > c23810c8-fe96-12df-5769-5a7a80c3c35f -no-user-config -nodefaults -chardev > socket,id=charmonitor,path=/var/lib/libvirt/qemu/srv.monitor,server,nowait > -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown > -boot order=cn,menu=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 > -drive > file=/vdisks/root.vhd,if=none,id=drive-virtio-disk0,format=vpc,cache=writeback > -device > virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 > -netdev tap,id=hostnet0 -device > rtl8139,netdev=hostnet0,id=net0,mac=00:00:00:00:00:00 -chardev > pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc > 0.0.0.0:53181 -vga cirrus -device > virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 > >> /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 > > srv > c23810c8-fe96-12df-5769-5a7a80c3c35f > 2097152 > 2097152 > 4 > > hvm > > > > > > > > > > > destroy > restart > restart > > /usr/bin/kvm > > > > > >function='0x0'/> > > > >function='0x2'/> > > > > > > > >function='0x0'/> > > > > > > > > > > > > > > > > > > >function='0x0'/> > > > >function='0x0'/> > > > > > > >
Re: [Qemu-discuss] virtual disks perfermonca <=2MB/s
On 20.02.2017 13:13, Vincenzo Romano wrote: I could be wrong, but are you willing to run a VM with a disk image over CIFS/SAMBA? If not, why are you quoting your network throughput? No, I do not share a disk image via cifs/samba. This is a test machine, mostly used for compiling, and I shared / folder to browse all files. First I've thought that it was a network problem, as I had problem setting networking. And I verified. > Could you please try (on a separate test VM) raw and qcow2? This VM was setup 2 days ago with latest Debian updates for Jessie. 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. > In understand your concerns about the disk space allocation, but if > you create a virtual disk of 50GB, I think you'd know it could grow up > to that size and that it won't automatically shrink back. This is my first attempt of a VM on qemu after a lot of years using Hyper-V 2008 R2. In Hyper-V I have little performance loose compared to direct host's disk access, and virtual disks can be compacted using gui command. I think that periodically I can recompact virtual disk using qemu/kvm/libvirt tools or Hyper-V in case of vhc/vhd (theoretically, as I've never reached initial limit, but I have chance to store more virtual disks for multiple VMs) > Please, elaborate more on your environment and objectives. It will be for compiling and testing. Thats why I mentioned that 50MB is ok. On 20.02.2017 13:37, Jakob Bohm wrote: > What does the same test return on the host (wheezy) machine on the same > disk/partition as the vhd. The host can handle 180MB+ > Also, consider using the native qemu disk image format (qcow2) instead > of the VHD format compatibility layer. I've tried raw and the speed is same. > virsh domxml-to-native qemu-argv tmp.xml LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/ QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-1.1 -enable-kvm -m 2048 -smp 4,sockets=4,cores=1,threads=1 -name srv -uuid c23810c8-fe96-12df-5769-5a7a80c3c35f -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/srv.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot order=cn,menu=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/vdisks/root.vhd,if=none,id=drive-virtio-disk0,format=vpc,cache=writeback -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=00:00:00:00:00:00 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 0.0.0.0:53181 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 > /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 srv c23810c8-fe96-12df-5769-5a7a80c3c35f 2097152 2097152 4 hvm destroy restart restart /usr/bin/kvm
Re: [Qemu-discuss] virtual disks perfermonca <=2MB/s
On 20/02/2017 12:05, Mimiko wrote: Hello. 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 What does the same test return on the host (wheezy) machine on the same disk/partition as the vhd. Also, consider using the native qemu disk image format (qcow2) instead of the VHD format compatibility layer. Finally, to help the qemu guys understand your situation, please provide the results of these commands: virsh dumpxml YOURVMNAME > tmp.xml virsh domxml-to-native qemu-argv tmp.xml /usr/bin/kvm --version (replace /usr/bin/kvm with whatever qemu command is seen in the domxml-to-native output) 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 ? Enjoy Jakob -- Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10 This public discussion message is non-binding and may contain errors. WiseMo - Remote Service Management for PCs, Phones and Embedded
Re: [Qemu-discuss] virtual disks perfermonca <=2MB/s
Hi. I could be wrong, but are you willing to run a VM with a disk image over CIFS/SAMBA? If not, why are you quoting your network throughput? Could you please try (on a separate test VM) raw and qcow2? In understand your concerns about the disk space allocation, but if you create a virtual disk of 50GB, I think you'd know it could grow up to that size and that it won't automatically shrink back. Please, elaborate more on your environment and objectives. -- Vincenzo Romano - NotOrAnd.IT Information Technologies -- NON QVIETIS MARIBVS NAVTA PERITVS 2017-02-20 12:05 GMT+01:00 Mimiko : > Hello. > > 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 ? >