From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vadim Rozenfeld Subject: Re: Performance issue Date: Thu, 29 Nov 2012 13:56:20 +0200 Message-ID: <201211291356.21344.vrozenfe@redhat.com> References: <201211281339.17589.vrozenfe@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Gleb Natapov , kvm@vger.kernel.org To: "George-Cristian =?iso-8859-1?q?B=EErzan?=" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38772 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753231Ab2K2L4n convert rfc822-to-8bit (ORCPT ); Thu, 29 Nov 2012 06:56:43 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Wednesday, November 28, 2012 09:09:29 PM George-Cristian B=EErzan wr= ote: > On Wed, Nov 28, 2012 at 1:39 PM, Vadim Rozenfeld =20 wrote: > > On Tuesday, November 27, 2012 11:13:12 PM George-Cristian B=EErzan = wrote: > >> On Tue, Nov 27, 2012 at 10:38 PM, Vadim Rozenfeld > >=20 > > wrote: > >> > I have some code which do both reference time and invariant TSC = but it > >> > will not work after migration. I will send it later today. > >>=20 > >> Do you mean migrating guests? This is not an issue for us. > >=20 > > OK, but don't say I didn't warn you :) > >=20 > > There are two patches, one for kvm and another one for qemu. > > you will probably need to rebase them. > > Add "hv_tsc" cpu parameter to activate this feature. > > you will probably need to deactivate hpet by adding "-no-hpet" > > parameter as well. >=20 > I've also added +hv_relaxed since then, but this is the command I'm I would suggest activating relaxed timing for all W2K8R2/Win7 guests. > using now and there's no change: >=20 > /usr/bin/qemu-kvm -name b691546e-79f8-49c6-a293-81067503a6ad -S -M > pc-1.2 -enable-kvm -m 16384 -smp 9,sockets=3D1,cores=3D9,threads=3D1 = -uuid > b691546e-79f8-49c6-a293-81067503a6ad -no-user-config -nodefaults > -chardev > socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/b691546e-79f8-49= c6-a293-8 > 1067503a6ad.monitor,server,nowait -mon > chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc > -no-hpet -no-shutdown -device > piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 -drive > file=3D/var/lib/libvirt/images/dis-magnetics-2-223101/d8b233c6-8424-4= de9-ae3c > -7c9a60288514,if=3Dnone,id=3Ddrive-virtio-disk0,format=3Dqcow2,cache=3D= writeback,ai > o=3Dnative -device > virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x5,drive=3Ddrive-virtio= -disk0,id=3Dvir > tio-disk0,bootindex=3D1 -netdev tap,fd=3D35,id=3Dhostnet0,vhost=3Don,= vhostfd=3D36 > -device > virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D22:2e:fb:a2:36:be,bu= s=3Dpci.0,addr > =3D0x3 -netdev tap,fd=3D40,id=3Dhostnet1,vhost=3Don,vhostfd=3D41 -dev= ice > virtio-net-pci,netdev=3Dhostnet1,id=3Dnet1,mac=3D22:94:44:5a:cb:24,bu= s=3Dpci.0,addr > =3D0x4 -vnc 127.0.0.1:0,password -vga cirrus -device > virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x6 -cpu host,hv_= tsc >=20 > I compiled qemu-1.2.0-24 after applying your patch, used the head for > KVM, and I see no difference. I've tried setting windows' > useplatformclock on and off, no change either. >=20 >=20 > Other than that, was looking into a profiling trace of the software > running and a lot of time (60%?) is spent calling two functions from > hal.dll, HalpGetPmTimerSleepModePerfCounter when I disable HPET, and > HalpHPETProgramRolloverTimer which do point at something related to > the timers. >=20 It means that hyper-v time stamp source was not activated. > Any other thing I can try? >=20 >=20 > -- > George-Cristian B=EErzan