<html><head><meta http-equiv="content-type" content="text/html; charset=GB2312"><style>body { line-height: 1.5; }body { font-size: 10.5pt; font-family: Î¢ÈíÑźÚ; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Hello:</div><div>    I  am using openstack + libvirt + qemu-kvm. The speed of copying files between virtual machines <span style="font-family: 'Tahoma, Arial, ËÎÌå, '; font-size: 10.5pt; line-height: 1.5; background-color: window;">exceeds 300M Byte per second but the speed of dd command:</span></div><div><div> "watch dd oflag=direct,nonblock if=/dev/zero of=/opt/iotest1 bs=4M count=10"  is around 20M byte per second. Every guest is the same, and there is no io tuning in libvirt. What can I do to unleash the speed of disk io speed inside the guest? </div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    </span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">    Thanks!</span></div><div><br></div><div>The libvirt vm xml is as follow:</div></div><div><br></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><domain type='kvm' id='446'><br>  <name>instance-00000663</name><br>  <uuid>d9bda7d7-f68a-45ea-84a1-f50faa44b801</uuid><br>  <metadata><br>    <nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0"><br>      <nova:package version="13.1.0-1.el7"/><br>      <nova:name>smtestiotune</nova:name><br>      <nova:creationTime>2017-08-23 07:38:13</nova:creationTime><br>      <nova:flavor name="1VCPU_1G-RAM_50G-DISK"><br>        <nova:memory>1024</nova:memory><br>        <nova:disk>50</nova:disk><br>        <nova:swap>0</nova:swap><br>        <nova:ephemeral>0</nova:ephemeral><br>        <nova:vcpus>1</nova:vcpus><br>      </nova:flavor><br>      <nova:owner><br>        <nova:user uuid="cbcec503badc4a4191048b6e948bd926">admin</nova:user><br>        <nova:project uuid="160b6ae5b7a645879d5e1fbd67693e8e">admin</nova:project><br>      </nova:owner><br>      <nova:root type="image" uuid="34714b12-281e-4180-8a6b-d6cd90c40d9c"/><br>    </nova:instance><br>  </metadata><br>  <memory unit='KiB'>1048576</memory><br>  <currentMemory unit='KiB'>1048576</currentMemory><br>  <vcpu placement='static'>1</vcpu><br>  <cputune><br>    <shares>1024</shares><br>  </cputune><br>  <resource><br>    <partition>/machine</partition><br>  </resource><br>  <sysinfo type='smbios'><br>    <system><br>      <entry name='manufacturer'>Fedora Project</entry><br>      <entry name='product'>OpenStack Nova</entry><br>      <entry name='version'>13.1.0-1.el7</entry><br>      <entry name='serial'>0994820c-3e23-4cc0-9b2c-f34fb88dee4e</entry><br>      <entry name='uuid'>d9bda7d7-f68a-45ea-84a1-f50faa44b801</entry><br>      <entry name='family'>Virtual Machine</entry><br>    </system><br>  </sysinfo><br>  <os><br>    <type arch='x86_64' machine='pc-i440fx-rhel7.2.0'>hvm</type><br>    <boot dev='hd'/><br>    <smbios mode='sysinfo'/><br>  </os><br>  <features><br>    <acpi/><br>    <apic/><br>  </features><br>  <cpu mode='host-model'><br>    <model fallback='allow'/><br>    <topology sockets='1' cores='1' threads='1'/><br>  </cpu><br>  <clock offset='utc'><br>    <timer name='pit' tickpolicy='delay'/><br>    <timer name='rtc' tickpolicy='catchup'/><br>    <timer name='hpet' present='no'/><br>  </clock><br>  <on_poweroff>destroy</on_poweroff><br>  <on_reboot>restart</on_reboot><br>  <on_crash>destroy</on_crash><br>  <devices><br>    <emulator>/usr/libexec/qemu-kvm</emulator><br>    <disk type='network' device='disk'><br>      <driver name='qemu' type='raw' cache='none'/><br>      <source protocol='rbd' name='volumes/d9bda7d7-f68a-45ea-84a1-f50faa44b801_disk'><br>        <host name='172.23.1.201' port='6789'/><br>        <host name='172.23.1.202' port='6789'/><br>        <host name='172.23.1.203' port='6789'/><br>      </source><br>      <backingStore/><br>      <target dev='vda' bus='virtio'/><br>      <alias name='virtio-disk0'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/><br>    </disk><br>    <controller type='usb' index='0'><br>      <alias name='usb'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/><br>    </controller><br>    <controller type='pci' index='0' model='pci-root'><br>      <alias name='pci.0'/><br>    </controller><br>    <controller type='virtio-serial' index='0'><br>      <alias name='virtio-serial0'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/><br>    </controller><br>    <interface type='bridge'><br>      <mac address='fa:16:3e:54:d9:9f'/><br>      <source bridge='qbr74234353-83'/><br>      <target dev='tap74234353-83'/><br>      <model type='virtio'/><br>      <alias name='net0'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/><br>    </interface><br>    <serial type='file'><br>      <source path='/var/lib/nova/instances/d9bda7d7-f68a-45ea-84a1-f50faa44b801/console.log'/><br>      <target port='0'/><br>      <alias name='serial0'/><br>    </serial><br>    <serial type='pty'><br>      <source path='/dev/pts/4'/><br>      <target port='1'/><br>      <alias name='serial1'/><br>    </serial><br>    <console type='file'><br>      <source path='/var/lib/nova/instances/d9bda7d7-f68a-45ea-84a1-f50faa44b801/console.log'/><br>      <target type='serial' port='0'/><br>      <alias name='serial0'/><br>    </console><br>    <channel type='unix'><br>      <source mode='bind' path='/var/lib/libvirt/qemu/org.qemu.guest_agent.0.instance-00000663.sock'/><br>      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/><br>      <alias name='channel0'/><br>      <address type='virtio-serial' controller='0' bus='0' port='1'/><br>    </channel><br>    <input type='tablet' bus='usb'><br>      <alias name='input0'/><br>    </input><br>    <input type='mouse' bus='ps2'/><br>    <input type='keyboard' bus='ps2'/><br>    <graphics type='vnc' port='5901' autoport='yes' listen='0.0.0.0' keymap='en-us'><br>      <listen type='address' address='0.0.0.0'/><br>    </graphics><br>    <video><br>      <model type='cirrus' vram='16384' heads='1'/><br>      <alias name='video0'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/><br>    </video><br>    <memballoon model='virtio'><br>      <stats period='10'/><br>      <alias name='balloon0'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/><br>    </memballoon><br>  </devices><br></domain></span></div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>chagg@foxmail.com</div></div></span></div>
</body></html>