From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVKEy-00006z-6W for qemu-devel@nongnu.org; Tue, 10 Mar 2015 09:30:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVKEr-0002xg-SZ for qemu-devel@nongnu.org; Tue, 10 Mar 2015 09:30:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVKEr-0002xW-L2 for qemu-devel@nongnu.org; Tue, 10 Mar 2015 09:30:25 -0400 Date: Tue, 10 Mar 2015 09:30:20 -0400 From: Luiz Capitulino Message-ID: <20150310093020.03826ffc@redhat.com> In-Reply-To: <1145290529.3285891.1425884694220.JavaMail.zimbra@oxygem.tv> References: <1295423186.3285313.1425883762941.JavaMail.zimbra@oxygem.tv> <1145290529.3285891.1425884694220.JavaMail.zimbra@oxygem.tv> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] balloon stats not working if qemu is started with -machine option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexandre DERUMIER Cc: qemu-devel , dietmar On Mon, 9 Mar 2015 08:04:54 +0100 (CET) Alexandre DERUMIER wrote: > I have forgot to said that we don't setup pooling interval manually. (whi= ch seem to works fine without -machine) >=20 >=20 > Now,if I setup guest-stats-polling-interval with qom-set, > it seem to works fine with -machine option. Setting the polling interval is a required step. The output you sent seems to indicate that the guest sent a stats update to the host unilaterally and those values seem buggy. I can investigate it if you provide full details (guest command-line plus full QMP command sequence). But you do have to set the polling interval to use the feature. >=20 >=20 >=20 > ----- Mail original ----- > De: "aderumier" > =C3=80: "qemu-devel" , "Luiz Capitulino" > Cc: "dietmar" > Envoy=C3=A9: Lundi 9 Mars 2015 07:49:22 > Objet: [Qemu-devel] balloon stats not working if qemu is started with -ma= chine option >=20 > Hi,=20 >=20 > I have noticed that balloon stats are not working if a qemu guest is star= ted with -machine option.=20 >=20 > (-machine pc, or any version) . Tested of qemu 1.7,2.1 && 2.2=20 >=20 >=20 > When the guest is starting (balloon driver not yet loaded)=20 >=20 > $VAR1 =3D {=20 > 'last-update' =3D> 0,=20 > 'stats' =3D> {=20 > 'stat-free-memory' =3D> -1,=20 > 'stat-swap-in' =3D> -1,=20 > 'stat-total-memory' =3D> -1,=20 > 'stat-major-faults' =3D> -1,=20 > 'stat-minor-faults' =3D> -1,=20 > 'stat-swap-out' =3D> -1=20 > }=20 > };=20 >=20 >=20 > then=20 >=20 > when the guest has loaded his driver=20 >=20 > $VAR1 =3D {=20 > 'last-update' =3D> 1425882998,=20 > 'stats' =3D> {=20 > 'stat-free-memory' =3D> -1,=20 > 'stat-swap-in' =3D> '4039065379203448832',=20 > 'stat-total-memory' =3D> -1,=20 > 'stat-major-faults' =3D> -1,=20 > 'stat-minor-faults' =3D> -1,=20 > 'stat-swap-out' =3D> '-6579759055588294656'=20 > }=20 > };=20 >=20 > $VAR1 =3D {=20 > 'last-update' =3D> 1425882998,=20 > 'stats' =3D> {=20 > 'stat-free-memory' =3D> -1,=20 > 'stat-swap-in' =3D> '4039065379203448832',=20 > 'stat-total-memory' =3D> -1,=20 > 'stat-major-faults' =3D> -1,=20 > 'stat-minor-faults' =3D> -1,=20 > 'stat-swap-out' =3D> '-6579759055588294656'=20 > }=20 > };=20 >=20 >=20 > $VAR1 =3D {=20 > 'last-update' =3D> 1425882998,=20 > 'stats' =3D> {=20 > 'stat-free-memory' =3D> -1,=20 > 'stat-swap-in' =3D> '4039065379203448832',=20 > 'stat-total-memory' =3D> -1,=20 > 'stat-major-faults' =3D> -1,=20 > 'stat-minor-faults' =3D> -1,=20 > 'stat-swap-out' =3D> '-6579759055588294656'=20 > }=20 > };=20 >=20 >=20 > It's seem that a some stats are retrieved, but last-update don't incremen= t.=20 > Removing the machine option resolve the problem.=20 >=20 >=20 > I'm working with proxmox team, and a lot of user have reported balloning = bug, because we pass the -machine option when are a doing live migration.=20 >=20 > I'm surprised that -machine pc also have this bug. (Isn't it supposed to = be the default machine config ?)=20 >=20 >=20 >=20 >=20 > here the sample command line:=20 >=20 >=20 > /usr/bin/kvm -id 150 -chardev socket,id=3Dqmp,path=3D/var/run/qemu-server= /150.qmp,server,nowait -mon chardev=3Dqmp,mode=3Dcontrol -vnc unix:/var/run= /qemu-server/150.vnc,x509,password -pidfile /var/run/qemu-server/150.pid -d= aemonize -smbios type=3D1,manufacturer=3Ddell,version=3D1,product=3D3,uuid= =3Df0686bfb-50b8-4d31-a4cb-b1cf60eeb648 -name debianok -smp 1,sockets=3D2,c= ores=3D1,maxcpus=3D2 -nodefaults -boot menu=3Don,strict=3Don,reboot-timeout= =3D1000 -vga cirrus -cpu kvm64,+lahf_lm,+x2apic,+sep -m 4096 -k fr -device = piix3-usb-uhci,id=3Duhci,bus=3Dpci.0,addr=3D0x1.0x2 -device usb-tablet,id= =3Dtablet,bus=3Duhci.0,port=3D1 -device virtio-balloon-pci,id=3Dballoon0,bu= s=3Dpci.0,addr=3D0x3 -iscsi initiator-name=3Diqn.1993-08.org.debian.01.24b0= d01a62a3 -drive file=3D/var/lib/vz/images/150/vm-150-disk-1.raw,if=3Dnone,i= d=3Ddrive-virtio0,format=3Draw,aio=3Dnative,cache=3Dnone -device virtio-blk= -pci,drive=3Ddrive-virtio0,id=3Dvirtio0,bus=3Dpci.0,addr=3D0xa,bootindex=3D= 100 -netdev type=3Dtap,id=3Dnet0,ifname=3Dtap150i0,script=3D/var/lib/qemu-s= erver/pve-bridge,downscript=3D/var/lib/qemu-server/pve-bridgedown,vhost=3Do= n -device virtio-net-pci,mac=3D76:EF:E9:ED:9D:41,netdev=3Dnet0,bus=3Dpci.0,= addr=3D0x12,id=3Dnet0,bootindex=3D300 -machine pc=20 >=20