qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] Which vCPU has better performance?


From: Jakob Bohm
Subject: Re: [Qemu-discuss] Which vCPU has better performance?
Date: Thu, 06 Dec 2012 11:06:59 +0100
User-agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 12/6/2012 3:47 AM, xuanmao_001 wrote:
> Hi,
> I tested some vcpu with qemu-kvm(such like host, core2duo, Nehalem,
> Penryn), but I can't see obvious performance difference? Any body can
> give me some ideas?
> my command line like follow:
> /usr/libexec/qemu-kvm -cpu host -m 2048 -enable-kvm -drive
> file=/var/lib/libvirt/images/Test_Performance.img,cache=writeback,if=virtio
> -localtime -net nic,model=virtio,macaddr=52:54:00:25:05:90 -net
> tap,ifname=tap0,script=/tmp/qemu-ifup -vnc 0.0.0.0:1 -vga std
> I only changed parameter -cpu like "core2duo, Nehalem, Penryn ..."
> Host HW info: CPU is Intel Celeron E3400 @ 2.60GHz, 4GB Memory.
> ------------------------------------------------------------------------
> xuanmao_001
qemu does not emulate the speed of the various CPUs, sometimes
qemu is faster than the real thing, sometimes slower. The -cpu
option changes very little (except where those vCPUs have
differences that cannot be combined), so mostly the -cpu option
just tells the programs inside the virtual machine which CPU
features they are supposed to know about.

qemu-kvm really always runs the VM on your real physical CPU.
With qemu-kvm, the -cpu option either does nothing at all or
just tells the programs inside the virtual machine which CPU
features they are supposed to know about.

So in either case, the only speed differences you should see
would be if the program you run inside the virtual machine is
written to run different code on different real CPUs, in which
case all you will be measuring is which of the codes in that
specific program run best on the qemu CPU.

For example, some programs use different methods of copying
bytes from one part of memory to another depending on what
runs fastest on different real world CPUs, and it will be
a matter of chance which of those methods run best on the
qemu CPU. Maybe it is the one the program thinks is best
for your E3400, maybe it is the one the program thinks is
best for a Nehalem, maybe those two are the same, but the
one the program would use on a real Penryn is better or
worse.

It has very little to do with the speed of qemu vCPUs, and
everything to do with what your test program will do depending
on which "lie" you tell it via the qemu -cpu option.

Enjoy

Jakob
-- 
Jakob Bohm, CIO, Partner, WiseMo A/S.  http://www.wisemo.com
Transformervej 29, 2730 Herlev, 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]