[libvirt] How to get iteration time & downtime?

Hi all, I'm a graduate student in Shanghai, and will do experiment about live migration using KVM as hypervisor. Due to my demand, I want to get each iteration time and downtime in migration. I found there is no API to implement it, and how can I obtain data I want? Thanks very much. Best wishes, Yale Yuan

On Tue, Mar 26, 2013 at 12:46:52 +0000, Yuan, Ye A wrote:
Hi all, I'm a graduate student in Shanghai, and will do experiment about live migration using KVM as hypervisor. Due to my demand, I want to get each iteration time and downtime in migration. I found there is no API to implement it, and how can I obtain data I want?
Libvirt provides virDomainGetJobStats API which gives you all migration statistics data provided by QEMU (via query-migrate QMP command). If you need something more, you would need to add reporting of the required additional statistics to QEMU first. Jirka

Jiri thank you, and I will attempt to do some research using virDomainGetJobStats API. Any stupid questions I will ask you later if necessary. :) Best wishes, Yale Yuan -----Original Message----- From: Jiri Denemark [mailto:jdenemar@redhat.com] Sent: Wednesday, March 27, 2013 5:38 PM To: Yuan, Ye A Cc: libvir-list@redhat.com Subject: Re: [libvirt] How to get iteration time & downtime? On Tue, Mar 26, 2013 at 12:46:52 +0000, Yuan, Ye A wrote:
Hi all, I'm a graduate student in Shanghai, and will do experiment about live migration using KVM as hypervisor. Due to my demand, I want to get each iteration time and downtime in migration. I found there is no API to implement it, and how can I obtain data I want?
Libvirt provides virDomainGetJobStats API which gives you all migration statistics data provided by QEMU (via query-migrate QMP command). If you need something more, you would need to add reporting of the required additional statistics to QEMU first. Jirka

Jiri, sorry for my stupid. I read your instruction about your API, but there is no function do get 'iteration time'. Does that mean I should implement it by myself? And if I want to get the dirty page bitmap, should I review libvirt source code and print information to log file during migration? Best wishes, Yale Yuan -----Original Message----- From: Yuan, Ye A Sent: Wednesday, March 27, 2013 7:09 PM To: 'Jiri Denemark' Cc: libvir-list@redhat.com Subject: RE: [libvirt] How to get iteration time & downtime? Jiri thank you, and I will attempt to do some research using virDomainGetJobStats API. Any stupid questions I will ask you later if necessary. :) Best wishes, Yale Yuan -----Original Message----- From: Jiri Denemark [mailto:jdenemar@redhat.com] Sent: Wednesday, March 27, 2013 5:38 PM To: Yuan, Ye A Cc: libvir-list@redhat.com Subject: Re: [libvirt] How to get iteration time & downtime? On Tue, Mar 26, 2013 at 12:46:52 +0000, Yuan, Ye A wrote:
Hi all, I'm a graduate student in Shanghai, and will do experiment about live migration using KVM as hypervisor. Due to my demand, I want to get each iteration time and downtime in migration. I found there is no API to implement it, and how can I obtain data I want?
Libvirt provides virDomainGetJobStats API which gives you all migration statistics data provided by QEMU (via query-migrate QMP command). If you need something more, you would need to add reporting of the required additional statistics to QEMU first. Jirka

On Wed, Mar 27, 2013 at 12:22:39 +0000, Yuan, Ye A wrote:
I read your instruction about your API, but there is no function do get 'iteration time'.
Right, you can only get downtime. The reason is that QEMU does not provide statistics about iteration time.
Does that mean I should implement it by myself? And if I want to get the dirty page bitmap, should I review libvirt source code and print information to log file during migration?
Well, it's not libvirt where you need to be looking. The migration is done in QEMU, libvirt just controls it. In other words, you need to go to QEMU sources to get more statistics about migration. And in case you need any guidance or answers for your questions, qemu-devel@nongnu.org is the primary list for QEMU developers. Jirka

:):):) I found that QEMU do migration and libvirt invoke it Thanks your help, Jiri!!!!! I will view QEMU source code ~~~!!! Best wishes, Yale Yuan -----Original Message----- From: Jiri Denemark (jdenemar@redhat.com) [mailto:jdenemar@redhat.com] Sent: Wednesday, March 27, 2013 8:47 PM To: Yuan, Ye A Cc: libvir-list@redhat.com Subject: Re: FW: [libvirt] How to get iteration time & downtime? On Wed, Mar 27, 2013 at 12:22:39 +0000, Yuan, Ye A wrote:
I read your instruction about your API, but there is no function do get 'iteration time'.
Right, you can only get downtime. The reason is that QEMU does not provide statistics about iteration time.
Does that mean I should implement it by myself? And if I want to get the dirty page bitmap, should I review libvirt source code and print information to log file during migration?
Well, it's not libvirt where you need to be looking. The migration is done in QEMU, libvirt just controls it. In other words, you need to go to QEMU sources to get more statistics about migration. And in case you need any guidance or answers for your questions, qemu-devel@nongnu.org is the primary list for QEMU developers. Jirka
participants (3)
-
Jiri Denemark
-
Jiri Denemark (jdenemar@redhat.com)
-
Yuan, Ye A