[libvirt-users] Live migration process in src/qemu_driver.ca

Hello, I have been trying to track different phases of a live migration process. I am using libvirt with qemu-kvm. I am issuing migration commands using virsh. Now, I want to measure the time spent in each phase of live migration, e.g., pre-copy and stop-copy. I stumbled upon the file qemu_driver.c. It has functions like qemudDomainMigratePrepare2 qemudDomainMigratePerform qemudDomainMigrateFinish2 I want to know whether qemudDomainMigratePerform and qemudDomainMigrateFinish2 directly map to the pre-copy and stop-copy phase? or the qemudDomainMigratePerform function performs both of them? Any pointers or suggestions will be greatly appreciated. Regards ---------------------- Md. Faizul Bari PhD Student David R. Cheriton School of Computer Science University of Waterloo {http://www.cs.uwaterloo.ca/~mfbari} [My mind rebels at stagnation! Give me problems! Give me work!]

On 03/20/2014 10:05 AM, Faizul Bari wrote:
Hello,
I have been trying to track different phases of a live migration process. I am using libvirt with qemu-kvm. I am issuing migration commands using virsh.
Now, I want to measure the time spent in each phase of live migration, e.g., pre-copy and stop-copy. I stumbled upon the file qemu_driver.c. It has functions like
qemudDomainMigratePrepare2 qemudDomainMigratePerform qemudDomainMigrateFinish2
These functions perform different handshakes between the two libvirt ends of the migration. However, the entire migration is done by a single qemu monitor command, and it is that monitor command that further divides the work into phases such as pre-copy and stop-copy.
I want to know whether qemudDomainMigratePerform and qemudDomainMigrateFinish2 directly map to the pre-copy and stop-copy phase? or the qemudDomainMigratePerform function performs both of them?
The MigratePerform function is the one place that calls the qemu monitor command. I know there have been proposals upstream in qemu to add additional statistics in 'query-migrate' monitor command; perhaps there is still more work needed in libvirt to grab those additional statistics in a manner that can be exposed to the user. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Thanks Eric. So, I need to look at QEMU. Do you know which files/functions should I look at? -- Faiz On Thu, Mar 20, 2014 at 12:41 PM, Eric Blake <eblake@redhat.com> wrote:
Hello,
I have been trying to track different phases of a live migration
On 03/20/2014 10:05 AM, Faizul Bari wrote: process. I
am using libvirt with qemu-kvm. I am issuing migration commands using virsh.
Now, I want to measure the time spent in each phase of live migration, e.g., pre-copy and stop-copy. I stumbled upon the file qemu_driver.c. It has functions like
qemudDomainMigratePrepare2 qemudDomainMigratePerform qemudDomainMigrateFinish2
These functions perform different handshakes between the two libvirt ends of the migration. However, the entire migration is done by a single qemu monitor command, and it is that monitor command that further divides the work into phases such as pre-copy and stop-copy.
I want to know whether qemudDomainMigratePerform and qemudDomainMigrateFinish2 directly map to the pre-copy and stop-copy
phase?
or the qemudDomainMigratePerform function performs both of them?
The MigratePerform function is the one place that calls the qemu monitor command. I know there have been proposals upstream in qemu to add additional statistics in 'query-migrate' monitor command; perhaps there is still more work needed in libvirt to grab those additional statistics in a manner that can be exposed to the user.
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 03/20/2014 01:43 PM, Faizul Bari wrote:
Thanks Eric.
[please don't top-post on technical lists]
So, I need to look at QEMU. Do you know which files/functions should I look at?
Here's a recent thread that is proposing to expose additional migration statistics: https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg03691.html Looking through that series, and the files it touches, may give you a better idea of how the existing statistics are tracked in qemu. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Faizul Bari