Re: [PATCH] migration: Usable time statistics without requiring NTP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 23, 2015 at 11:18:08AM +0200, Jiri Denemark wrote:
virDomainGetJobStats is able to report statistics of a completed
migration, however to get usable downtime and total time statistics both
hosts have to keep synchronized time. To provide at least some
estimation of the times even when NTP daemons are not running on both
hosts we can just ignore the time needed to transfer a migration cookie
to the destination host. The result will be also inaccurate but a bit
more predictable. The total/down time will just be at least what we
report.

https://bugzilla.redhat.com/show_bug.cgi?id=1213434
Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
include/libvirt/libvirt-domain.h | 23 ++++++++++++++++++++++-
src/qemu/qemu_domain.c           | 15 +++++++++++++++
src/qemu/qemu_domain.h           |  9 +++++++++
src/qemu/qemu_migration.c        | 26 +++++++++++++-------------
tools/virsh-domain.c             | 16 ++++++++++++++++
5 files changed, 75 insertions(+), 14 deletions(-)

diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 6bea7c7..1b93f7d 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -100,9 +100,18 @@ struct _qemuDomainJobInfo {
    virDomainJobType type;
    unsigned long long started; /* When the async job started */
    unsigned long long stopped; /* When the domain's CPUs were stopped */
+    unsigned long long sent; /* When the source sent status info to the
+                                destination (only for migrations). */
+    unsigned long long received; /* When the destination host received status
+                                    info from the source (migrations only). */
    /* Computed values */
    unsigned long long timeElapsed;
    unsigned long long timeRemaining;
+    long long timeDelta; /* delta = sent - received, i.e., the difference

This should be recieved - sent.

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]