[CentOS-virt] disk i/o benchmarking inside vm

Sat Oct 8 17:45:31 UTC 2011
Dennis Jacobfeuerborn <dennisml at conversis.de>

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gw1.xml
Type: text/xml
Size: 1794 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos-virt/attachments/20111008/0e698e7b/attachment-0010.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gw2.xml
Type: text/xml
Size: 1794 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos-virt/attachments/20111008/0e698e7b/attachment-0011.xml>