Re: [pve-devel] balloon bug in qemu 2.1 ?
Hi Alexandre, Yes the affected VM seem to have -machine type=pc-i440fx-2.1 in their KVM parameters. I found a bunch that have machine: pc-i440fx-1.4 in the config, and KVM parameters, and they output the full balloon stats e.g.: # info balloon balloon: actual=4096 max_mem=4096 total_mem=4095 free_mem=2221 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=0 minor_page_faults=43 last_update=1425629742 On Fri, Mar 6, 2015 at 4:17 AM, Alexandre DERUMIER aderum...@odiso.com wrote: ok,I speak too fast. It's not related to this patch. on current pve-qemu-kvm 2.1. balloon is working fine # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=941 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=120 minor_page_faults=215272 last_update=1425568324 But if the vm (qemu 2.1) is started with -machine type=pc-i440fx-2.1 or -machine type=pc-i440fx-2.0 (this is the case when you do a live migration) It's not working # info balloon balloon: actual=1024 max_mem=1024 @Andrew, are your vm where you see the info balloon bug, have been migrated from old proxmox (without stop/start ?) can you check in ssh if the kvm process have -machine type in the command line ? - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 16:05:03 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? I need to do more tests, but it seem that this commit (applied on qemu 2.2 but not on qemu 2.1) http://git.qemu.org/?p=qemu.git;a=commit;h=22644cd2c60151a964d9505f4c5f7baf845f20d8 fix the problem with qemu 2.1. (I have tested with the patch, balloon works fine, I need to test without the patch to compare) - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:41:51 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? in proxmox virtio-balloon-fix-query.patch, we have hw/virtio/virtio-balloon.c + + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } + + info-last_update = dev-stats_last_update; + info-has_last_update = true; + + info-mem_swapped_in = dev-stats[VIRTIO_BALLOON_S_SWAP_IN]; + info-has_mem_swapped_in = info-mem_swapped_in = 0 ? true : false; + + info-mem_swapped_out = dev-stats[VIRTIO_BALLOON_S_SWAP_OUT]; + info-has_mem_swapped_out = info-mem_swapped_out = 0 ? true : false; + + info-major_page_faults = dev-stats[VIRTIO_BALLOON_S_MAJFLT]; + info-has_major_page_faults = info-major_page_faults = 0 ? true : false; + + info-minor_page_faults = dev-stats[VIRTIO_BALLOON_S_MINFLT]; + info-has_minor_page_faults = info-minor_page_faults = 0 ? true : false; + so, that mean that in qemu 2.1 + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } one of this 3 funtions is not working - Mail original - De: Andrew Thrift and...@networklabs.co.nz À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:17:58 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Hi Alexandre, This may be the cause of the crashes we have been experiencing. We reported them here: http://forum.proxmox.com/threads/21276-Kernel-Oops-Panic-on-3-10-5-and-3-10-7-Kernels These only started happening since we moved to qemu-2.1.x and we get the same output: # info balloon balloon: actual=16384 max_mem=16384 and have noticed VM's with only 1-2GB usage in the guest reporting almost the entire amount of ram used to the host, even though we have the latest balloon driver loaded and the blnsvr.exe service running. On Thu, Mar 5, 2015 at 11:33 PM, Alexandre DERUMIER aderum...@odiso.com wrote: Hi, I have see a bug report here: http://forum.proxmox.com/threads/2-RAM-Problem-since-Upgrade-to-3-4?p=108367posted=1#post108367 about balloon. on my qemu 2.2 #info balloon balloon: actual=1024 max_mem=2048 total_mem=985 free_mem=895 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=301 minor_page_faults=61411 last_update=1425550707 same vm with qemu 2.2 + -machine type=pc-i440fx-2.1 #info balloon balloon: actual=1024 max_mem=2048 (Don't have true qemu 2.1 for test currently) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
maybe this commit http://git.qemu.org/?p=qemu.git;a=commit;h=91ba21208839643603e7f7fa5864723c3f371ebe http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg05176.html virtio-balloon: fix virtio-balloon child refcount in transports diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 40652a7..62f84c4 100644 (file) --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1325,7 +1325,7 @@ static void virtio_balloon_pci_instance_init(Object *obj) VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(obj); object_initialize(dev-vdev, sizeof(dev-vdev), TYPE_VIRTIO_BALLOON); object_property_add_child(obj, virtio-backend, OBJECT(dev-vdev), NULL); - +object_unref(OBJECT(dev-vdev)); object_property_add(obj, guest-stats, guest statistics, balloon_pci_stats_get_all, NULL, NULL, dev, NULL); It's has been applied in qemu 2.1.3 , I'll do test with qemu 2.1.2. - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 18:14:53 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Thanks Michael That's seem to confirm that the problem come from the -machine option. I'm currently digging inside qemu code to find what does it change. - Mail original - De: datanom.net m...@datanom.net À: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 17:30:00 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? On Thu, 5 Mar 2015 16:44:05 +0100 (CET) Alexandre DERUMIER aderum...@odiso.com wrote: Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 Before migration: # info version 2.1.3 # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=75 mem_swapped_in=165457920 mem_swapped_out=401846272 major_page_faults=29400 minor_page_faults=231808189 last_update=1425572879 After migration # info balloon balloon: actual=1024 max_mem=1024 You you stop and start then VM balloon works again. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: May you have many handsome and obedient sons. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
only max_mem is missing from orignal qmp query-balloon or qom-get. No sure we need to keep a patch just for this. We can use vmid.conf value. (with pending, now we also have true value) This can be retrieve too with qom : stat-total-memory so,only actual balloon value need to an extra qmp query. - Mail original - De: aderumier aderum...@odiso.com À: dietmar diet...@proxmox.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 06:53:46 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? just send a patch. the actual value is return by original query-balloon. only max_mem is missing from orignal qmp query-balloon or qom-get. No sure we need to keep a patch just for this. We can use vmid.conf value. (with pending, now we also have true value) - Mail original - De: dietmar diet...@proxmox.com À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 06:32:22 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? As far I remember, we have make the virtio-balloon-fix-query.patch patch, because at this time, it was impossible to use qom guest-stats to retrieve all values in 1 call (And we wanted to avoid to call 5-6 times qom guest-stats) yes, we use that inside QemuServer::vmstatus, so that needs to be fast because we call it frequently. Now,it seem that we can get all values directly. (excluding actual-max_mem). Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
On Thu, 5 Mar 2015 16:44:05 +0100 (CET) Alexandre DERUMIER aderum...@odiso.com wrote: Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 Before migration: # info version 2.1.3 # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=75 mem_swapped_in=165457920 mem_swapped_out=401846272 major_page_faults=29400 minor_page_faults=231808189 last_update=1425572879 After migration # info balloon balloon: actual=1024 max_mem=1024 You you stop and start then VM balloon works again. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: May you have many handsome and obedient sons. pgpF8a3d_d6YY.pgp Description: OpenPGP digital signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
Thanks Michael That's seem to confirm that the problem come from the -machine option. I'm currently digging inside qemu code to find what does it change. - Mail original - De: datanom.net m...@datanom.net À: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 17:30:00 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? On Thu, 5 Mar 2015 16:44:05 +0100 (CET) Alexandre DERUMIER aderum...@odiso.com wrote: Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 Before migration: # info version 2.1.3 # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=75 mem_swapped_in=165457920 mem_swapped_out=401846272 major_page_faults=29400 minor_page_faults=231808189 last_update=1425572879 After migration # info balloon balloon: actual=1024 max_mem=1024 You you stop and start then VM balloon works again. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: May you have many handsome and obedient sons. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 16:17:49 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? ok,I speak too fast. It's not related to this patch. on current pve-qemu-kvm 2.1. balloon is working fine # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=941 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=120 minor_page_faults=215272 last_update=1425568324 But if the vm (qemu 2.1) is started with -machine type=pc-i440fx-2.1 or -machine type=pc-i440fx-2.0 (this is the case when you do a live migration) It's not working # info balloon balloon: actual=1024 max_mem=1024 @Andrew, are your vm where you see the info balloon bug, have been migrated from old proxmox (without stop/start ?) can you check in ssh if the kvm process have -machine type in the command line ? - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 16:05:03 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? I need to do more tests, but it seem that this commit (applied on qemu 2.2 but not on qemu 2.1) http://git.qemu.org/?p=qemu.git;a=commit;h=22644cd2c60151a964d9505f4c5f7baf845f20d8 fix the problem with qemu 2.1. (I have tested with the patch, balloon works fine, I need to test without the patch to compare) - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:41:51 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? in proxmox virtio-balloon-fix-query.patch, we have hw/virtio/virtio-balloon.c + + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } + + info-last_update = dev-stats_last_update; + info-has_last_update = true; + + info-mem_swapped_in = dev-stats[VIRTIO_BALLOON_S_SWAP_IN]; + info-has_mem_swapped_in = info-mem_swapped_in = 0 ? true : false; + + info-mem_swapped_out = dev-stats[VIRTIO_BALLOON_S_SWAP_OUT]; + info-has_mem_swapped_out = info-mem_swapped_out = 0 ? true : false; + + info-major_page_faults = dev-stats[VIRTIO_BALLOON_S_MAJFLT]; + info-has_major_page_faults = info-major_page_faults = 0 ? true : false; + + info-minor_page_faults = dev-stats[VIRTIO_BALLOON_S_MINFLT]; + info-has_minor_page_faults = info-minor_page_faults = 0 ? true : false; + so, that mean that in qemu 2.1 + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } one of this 3 funtions is not working - Mail original - De: Andrew Thrift and...@networklabs.co.nz À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:17:58 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Hi Alexandre, This may be the cause of the crashes we have been experiencing. We reported them here: http://forum.proxmox.com/threads/21276-Kernel-Oops-Panic-on-3-10-5-and-3-10-7-Kernels These only started happening since we moved to qemu-2.1.x and we get the same output: # info balloon balloon: actual=16384 max_mem=16384 and have noticed VM's with only 1-2GB usage in the guest reporting almost the entire amount of ram used to the host, even though we have the latest balloon driver loaded and the blnsvr.exe service running. On Thu, Mar 5, 2015 at 11:33 PM, Alexandre DERUMIER aderum...@odiso.com wrote: Hi, I have see a bug report here: http://forum.proxmox.com/threads/2-RAM-Problem-since-Upgrade-to-3-4?p=108367posted=1#post108367 about balloon. on my qemu 2.2 #info balloon balloon: actual=1024 max_mem=2048 total_mem=985 free_mem=895 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=301 minor_page_faults=61411 last_update=1425550707 same vm with qemu 2.2 + -machine type=pc-i440fx-2.1 #info balloon balloon: actual=1024 max_mem=2048 (Don't have true qemu 2.1 for test currently) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve
Re: [pve-devel] balloon bug in qemu 2.1 ?
ok,I speak too fast. It's not related to this patch. on current pve-qemu-kvm 2.1. balloon is working fine # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=941 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=120 minor_page_faults=215272 last_update=1425568324 But if the vm (qemu 2.1) is started with -machine type=pc-i440fx-2.1 or -machine type=pc-i440fx-2.0 (this is the case when you do a live migration) It's not working # info balloon balloon: actual=1024 max_mem=1024 @Andrew, are your vm where you see the info balloon bug, have been migrated from old proxmox (without stop/start ?) can you check in ssh if the kvm process have -machine type in the command line ? - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 16:05:03 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? I need to do more tests, but it seem that this commit (applied on qemu 2.2 but not on qemu 2.1) http://git.qemu.org/?p=qemu.git;a=commit;h=22644cd2c60151a964d9505f4c5f7baf845f20d8 fix the problem with qemu 2.1. (I have tested with the patch, balloon works fine, I need to test without the patch to compare) - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:41:51 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? in proxmox virtio-balloon-fix-query.patch, we have hw/virtio/virtio-balloon.c + + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } + + info-last_update = dev-stats_last_update; + info-has_last_update = true; + + info-mem_swapped_in = dev-stats[VIRTIO_BALLOON_S_SWAP_IN]; + info-has_mem_swapped_in = info-mem_swapped_in = 0 ? true : false; + + info-mem_swapped_out = dev-stats[VIRTIO_BALLOON_S_SWAP_OUT]; + info-has_mem_swapped_out = info-mem_swapped_out = 0 ? true : false; + + info-major_page_faults = dev-stats[VIRTIO_BALLOON_S_MAJFLT]; + info-has_major_page_faults = info-major_page_faults = 0 ? true : false; + + info-minor_page_faults = dev-stats[VIRTIO_BALLOON_S_MINFLT]; + info-has_minor_page_faults = info-minor_page_faults = 0 ? true : false; + so, that mean that in qemu 2.1 + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } one of this 3 funtions is not working - Mail original - De: Andrew Thrift and...@networklabs.co.nz À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:17:58 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Hi Alexandre, This may be the cause of the crashes we have been experiencing. We reported them here: http://forum.proxmox.com/threads/21276-Kernel-Oops-Panic-on-3-10-5-and-3-10-7-Kernels These only started happening since we moved to qemu-2.1.x and we get the same output: # info balloon balloon: actual=16384 max_mem=16384 and have noticed VM's with only 1-2GB usage in the guest reporting almost the entire amount of ram used to the host, even though we have the latest balloon driver loaded and the blnsvr.exe service running. On Thu, Mar 5, 2015 at 11:33 PM, Alexandre DERUMIER aderum...@odiso.com wrote: Hi, I have see a bug report here: http://forum.proxmox.com/threads/2-RAM-Problem-since-Upgrade-to-3-4?p=108367posted=1#post108367 about balloon. on my qemu 2.2 #info balloon balloon: actual=1024 max_mem=2048 total_mem=985 free_mem=895 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=301 minor_page_faults=61411 last_update=1425550707 same vm with qemu 2.2 + -machine type=pc-i440fx-2.1 #info balloon balloon: actual=1024 max_mem=2048 (Don't have true qemu 2.1 for test currently) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
Hi Alexandre, This may be the cause of the crashes we have been experiencing.We reported them here: http://forum.proxmox.com/threads/21276-Kernel-Oops-Panic-on-3-10-5-and-3-10-7-Kernels These only started happening since we moved to qemu-2.1.x and we get the same output: # info balloon balloon: actual=16384 max_mem=16384 and have noticed VM's with only 1-2GB usage in the guest reporting almost the entire amount of ram used to the host, even though we have the latest balloon driver loaded and the blnsvr.exe service running. On Thu, Mar 5, 2015 at 11:33 PM, Alexandre DERUMIER aderum...@odiso.com wrote: Hi, I have see a bug report here: http://forum.proxmox.com/threads/2-RAM-Problem-since-Upgrade-to-3-4?p=108367posted=1#post108367 about balloon. on my qemu 2.2 #info balloon balloon: actual=1024 max_mem=2048 total_mem=985 free_mem=895 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=301 minor_page_faults=61411 last_update=1425550707 same vm with qemu 2.2 + -machine type=pc-i440fx-2.1 #info balloon balloon: actual=1024 max_mem=2048 (Don't have true qemu 2.1 for test currently) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
I need to do more tests, but it seem that this commit (applied on qemu 2.2 but not on qemu 2.1) http://git.qemu.org/?p=qemu.git;a=commit;h=22644cd2c60151a964d9505f4c5f7baf845f20d8 fix the problem with qemu 2.1. (I have tested with the patch, balloon works fine, I need to test without the patch to compare) - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:41:51 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? in proxmox virtio-balloon-fix-query.patch, we have hw/virtio/virtio-balloon.c + + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } + + info-last_update = dev-stats_last_update; + info-has_last_update = true; + + info-mem_swapped_in = dev-stats[VIRTIO_BALLOON_S_SWAP_IN]; + info-has_mem_swapped_in = info-mem_swapped_in = 0 ? true : false; + + info-mem_swapped_out = dev-stats[VIRTIO_BALLOON_S_SWAP_OUT]; + info-has_mem_swapped_out = info-mem_swapped_out = 0 ? true : false; + + info-major_page_faults = dev-stats[VIRTIO_BALLOON_S_MAJFLT]; + info-has_major_page_faults = info-major_page_faults = 0 ? true : false; + + info-minor_page_faults = dev-stats[VIRTIO_BALLOON_S_MINFLT]; + info-has_minor_page_faults = info-minor_page_faults = 0 ? true : false; + so, that mean that in qemu 2.1 + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } one of this 3 funtions is not working - Mail original - De: Andrew Thrift and...@networklabs.co.nz À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:17:58 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Hi Alexandre, This may be the cause of the crashes we have been experiencing. We reported them here: http://forum.proxmox.com/threads/21276-Kernel-Oops-Panic-on-3-10-5-and-3-10-7-Kernels These only started happening since we moved to qemu-2.1.x and we get the same output: # info balloon balloon: actual=16384 max_mem=16384 and have noticed VM's with only 1-2GB usage in the guest reporting almost the entire amount of ram used to the host, even though we have the latest balloon driver loaded and the blnsvr.exe service running. On Thu, Mar 5, 2015 at 11:33 PM, Alexandre DERUMIER aderum...@odiso.com wrote: Hi, I have see a bug report here: http://forum.proxmox.com/threads/2-RAM-Problem-since-Upgrade-to-3-4?p=108367posted=1#post108367 about balloon. on my qemu 2.2 #info balloon balloon: actual=1024 max_mem=2048 total_mem=985 free_mem=895 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=301 minor_page_faults=61411 last_update=1425550707 same vm with qemu 2.2 + -machine type=pc-i440fx-2.1 #info balloon balloon: actual=1024 max_mem=2048 (Don't have true qemu 2.1 for test currently) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
As far I remember, we have make the virtio-balloon-fix-query.patch patch, because at this time, it was impossible to use qom guest-stats to retrieve all values in 1 call (And we wanted to avoid to call 5-6 times qom guest-stats) yes, we use that inside QemuServer::vmstatus, so that needs to be fast because we call it frequently. Now,it seem that we can get all values directly. (excluding actual-max_mem). Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? just send a patch. the actual value is return by original query-balloon. only max_mem is missing from orignal qmp query-balloon or qom-get. No sure we need to keep a patch just for this. We can use vmid.conf value. (with pending, now we also have true value) - Mail original - De: dietmar diet...@proxmox.com À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 06:32:22 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? As far I remember, we have make the virtio-balloon-fix-query.patch patch, because at this time, it was impossible to use qom guest-stats to retrieve all values in 1 call (And we wanted to avoid to call 5-6 times qom guest-stats) yes, we use that inside QemuServer::vmstatus, so that needs to be fast because we call it frequently. Now,it seem that we can get all values directly. (excluding actual-max_mem). Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
This can be retrieve too with qom : stat-total-memory so,only actual balloon value need to an extra qmp query. Oops, sorry, this is wrong. qom stat-total-memory = qmp actual I need to rebase my patch for a v3 - Mail original - De: aderumier aderum...@odiso.com À: dietmar diet...@proxmox.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 07:50:44 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? only max_mem is missing from orignal qmp query-balloon or qom-get. No sure we need to keep a patch just for this. We can use vmid.conf value. (with pending, now we also have true value) This can be retrieve too with qom : stat-total-memory so,only actual balloon value need to an extra qmp query. - Mail original - De: aderumier aderum...@odiso.com À: dietmar diet...@proxmox.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 06:53:46 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? just send a patch. the actual value is return by original query-balloon. only max_mem is missing from orignal qmp query-balloon or qom-get. No sure we need to keep a patch just for this. We can use vmid.conf value. (with pending, now we also have true value) - Mail original - De: dietmar diet...@proxmox.com À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 06:32:22 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? As far I remember, we have make the virtio-balloon-fix-query.patch patch, because at this time, it was impossible to use qom guest-stats to retrieve all values in 1 call (And we wanted to avoid to call 5-6 times qom guest-stats) yes, we use that inside QemuServer::vmstatus, so that needs to be fast because we call it frequently. Now,it seem that we can get all values directly. (excluding actual-max_mem). Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
Seem to be a proxmox bug finally (or maybe proxmox use a path not used anymore by qemu), using qom balloon guest-stats (with the guest is started with -machine ..) my $stats = vm_mon_cmd_nocheck($vmid, 'qom-get', path = machine/peripheral/balloon0, property = guest-stats); $VAR1 = { 'last-update' = 1425614800, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0,'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044,'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614814, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0,'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044,'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614840, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0,'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044,'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614932, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0,'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044,'stat-swap-out' = 0 } }; # info balloon balloon: actual=4096 max_mem=4096 # info balloon balloon: actual=4096 max_mem=4096 # info balloon balloon: actual=4096 max_mem=4096 - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 20:15:15 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? maybe this commit http://git.qemu.org/?p=qemu.git;a=commit;h=91ba21208839643603e7f7fa5864723c3f371ebe http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg05176.html virtio-balloon: fix virtio-balloon child refcount in transports diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 40652a7..62f84c4 100644 (file) --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1325,7 +1325,7 @@ static void virtio_balloon_pci_instance_init(Object *obj) VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(obj); object_initialize(dev-vdev, sizeof(dev-vdev), TYPE_VIRTIO_BALLOON); object_property_add_child(obj, virtio-backend, OBJECT(dev-vdev), NULL); - + object_unref(OBJECT(dev-vdev)); object_property_add(obj, guest-stats, guest statistics, balloon_pci_stats_get_all, NULL, NULL, dev, NULL); It's has been applied in qemu 2.1.3 , I'll do test with qemu 2.1.2. - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 18:14:53 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Thanks Michael That's seem to confirm that the problem come from the -machine option. I'm currently digging inside qemu code to find what does it change. - Mail original - De: datanom.net m...@datanom.net À: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 17:30:00 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? On Thu, 5 Mar 2015 16:44:05 +0100 (CET) Alexandre DERUMIER aderum...@odiso.com wrote: Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 Before migration: # info version 2.1.3 # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=75 mem_swapped_in=165457920 mem_swapped_out=401846272 major_page_faults=29400 minor_page_faults=231808189 last_update=1425572879 After migration # info balloon balloon: actual=1024 max_mem=1024 You you stop and start then VM balloon works again. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: May you have many handsome and obedient sons. ___ pve-devel mailing
Re: [pve-devel] balloon bug in qemu 2.1 ?
@Dietmar: As far I remember, we have make the virtio-balloon-fix-query.patch patch, because at this time, it was impossible to use qom guest-stats to retrieve all values in 1 call (And we wanted to avoid to call 5-6 times qom guest-stats) Now,it seem that we can get all values directly. (excluding actual-max_mem). Maybe it's time to remove this patch, and use qemu qom implementation ? - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net, dietmar diet...@proxmox.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 05:26:58 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Seem to be a proxmox bug finally (or maybe proxmox use a path not used anymore by qemu), using qom balloon guest-stats (with the guest is started with -machine ..) my $stats = vm_mon_cmd_nocheck($vmid, 'qom-get', path = machine/peripheral/balloon0, property = guest-stats); $VAR1 = { 'last-update' = 1425614800, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0, 'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044, 'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614814, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0, 'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044, 'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614840, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0, 'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044, 'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614932, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0, 'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044, 'stat-swap-out' = 0 } }; # info balloon balloon: actual=4096 max_mem=4096 # info balloon balloon: actual=4096 max_mem=4096 # info balloon balloon: actual=4096 max_mem=4096 - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 20:15:15 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? maybe this commit http://git.qemu.org/?p=qemu.git;a=commit;h=91ba21208839643603e7f7fa5864723c3f371ebe http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg05176.html virtio-balloon: fix virtio-balloon child refcount in transports diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 40652a7..62f84c4 100644 (file) --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1325,7 +1325,7 @@ static void virtio_balloon_pci_instance_init(Object *obj) VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(obj); object_initialize(dev-vdev, sizeof(dev-vdev), TYPE_VIRTIO_BALLOON); object_property_add_child(obj, virtio-backend, OBJECT(dev-vdev), NULL); - + object_unref(OBJECT(dev-vdev)); object_property_add(obj, guest-stats, guest statistics, balloon_pci_stats_get_all, NULL, NULL, dev, NULL); It's has been applied in qemu 2.1.3 , I'll do test with qemu 2.1.2. - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 18:14:53 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Thanks Michael That's seem to confirm that the problem come from the -machine option. I'm currently digging inside qemu code to find what does it change. - Mail original - De: datanom.net m...@datanom.net À: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 17:30:00 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? On Thu, 5 Mar 2015 16:44:05 +0100 (CET) Alexandre DERUMIER aderum...@odiso.com wrote: Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 Before migration: # info version 2.1.3 # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=75 mem_swapped_in=165457920 mem_swapped_out=401846272 major_page_faults=29400 minor_page_faults=231808189 last_update=1425572879 After migration # info balloon balloon: actual=1024 max_mem=1024 You you stop and start then VM balloon works again. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: May you have many handsome and obedient sons. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
On March 6, 2015 at 5:26 AM Alexandre DERUMIER aderum...@odiso.com wrote: Seem to be a proxmox bug finally (or maybe proxmox use a path not used anymore by qemu), using qom balloon guest-stats (with the guest is started with -machine ..) Maybe you can try to find out what we do differently? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel