disk i/o benchmarking inside vm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi,
I'm having trouble benchmarking disk i/o in my vm's. The data I get seems bogus. I have two centos 6 guests which use a raw image as volume. Each volume is stored on its own physical disk and both disks are the same model. The host system is fedora 15 with the virt-preview repo enabled. The disks for the guests use virtio and caching is set to none.

My problem is that I get very different results when I benchmark I/O in these guests even though I shouldn't. Doing a seekmark I get:
guest 1: 120 seeks/s
guest 2: 220 seeks/s

"hdparm -t" shows:
guest 1: 100 MB/s
guest 1: 160 MB/s

What's worse is that when I restart the guests the results change and suddenly guest 1 is a lot faster and guest 2 is a lot slower however as long as the guests are running repeating the benchmarks give consistent results.

When I test the disks on the host directly I get:
seekmark:
/dev/sdb: 75 seeks/s
/dev/sdc: 75 seeks/s

hdparm -t:
/dev/sdb: 140 MB/s
/dev/sdc: 140 MB/s

What bugs me is not so much the absolute numbers (for now) but the fact that these guests give so wildly inconsistent results. Even if the jump from 75 seeks/s to 120 seeks/s from host to guest is explainable by the way block i/o is handled in the virtualization layer I would still expect both guests to return similar results and I would also expect to see similar results across restarts of a single guest.

I've attached the definition for both guests even though they are virtually identical.

Does anyone have an idea what's happening here?

Regards,
  Dennis
<domain type='kvm'>
  <name>gw1</name>
  <uuid>ac24997b-a63c-e136-2ad4-061e7e9a72f8</uuid>
  <memory>786432</memory>
  <currentMemory>786432</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-0.14'>hvm</type>
    <boot dev='hd'/>
  </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/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/mnt/backup01/libvirt/images/gw1.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <interface type='bridge'>
      <mac address='52:54:00:1d:db:49'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <interface type='network'>
      <mac address='52:54:00:81:7d:79'/>
      <source network='internal'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>

<domain type='kvm'>
  <name>gw2</name>
  <uuid>f8e383ec-99ae-6500-cf8d-bf0b341106f9</uuid>
  <memory>786432</memory>
  <currentMemory>786432</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-0.14'>hvm</type>
    <boot dev='hd'/>
  </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/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/mnt/backup02/libvirt/images/gw2.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <interface type='bridge'>
      <mac address='52:54:00:2f:9c:b6'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <interface type='network'>
      <mac address='52:54:00:57:f3:49'/>
      <source network='internal'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>

_______________________________________________
CentOS-virt mailing list
CentOS-virt@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos-virt

[CentOS Users]     [Linux Media]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Xfree86]     [Devices]     [Linux USB]

Powered by Linux Add to Google