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

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



On Mon, Apr 27, 2015 at 09:31:30 +0200, Martin Kletzander wrote:
> 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 redhat com>
> >---
> > 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.

Ah, thanks, I push the trivial patch to fix this.

Jirka


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