qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3] qapi/qmp: Add timestamps to qmp command responses


From: Daniel P . Berrangé
Subject: Re: [PATCH v3] qapi/qmp: Add timestamps to qmp command responses
Date: Fri, 14 Oct 2022 12:31:09 +0100
User-agent: Mutt/2.2.7 (2022-08-07)

On Fri, Oct 14, 2022 at 11:31:13AM +0200, Markus Armbruster wrote:
> Daniel P. Berrangé <berrange@redhat.com> writes:
> 
> > On Thu, Oct 13, 2022 at 05:00:26PM +0200, Markus Armbruster wrote:
> >> Denis Plotnikov <den-plotnikov@yandex-team.ru> writes:
> >> 
> >> > Add "start" & "end" time values to qmp command responses.
> >> 
> >> Please spell it QMP.  More of the same below.
> >> 
> >> >
> >> > These time values are added to let the qemu management layer get the 
> >> > exact
> >> > command execution time without any other time variance which might be 
> >> > brought by
> >> > other parts of management layer or qemu internals. This is particulary 
> >> > useful
> >> > for the management layer logging for later problems resolving.
> >> 
> >> I'm still having difficulties seeing the value add over existing
> >> tracepoints and logging.
> >> 
> >> Can you tell me about a problem you cracked (or could have cracked) with
> >> the help of this?
> >
> > Consider your QMP client is logging all commands and replies in its
> > own logfile (libvirt can do this). Having this start/end timestamps
> > included means the QMP client log is self contained.
> 
> A QMP client can include client-side timestamps in its log.  What value
> is being added by server-side timestamps?  According to the commit
> message, it's for getting "the exact command execution time without any
> other time variance which might be brought by other parts of management
> layer or qemu internals."  Why is that useful?  In particular, why is
> excluding network and QEMU queueing delays (inbound and outbound)
> useful?

Lets, say some commands normally runs in ~100ms, but occasionally
runs in 2secs, and you want to understand why.

A first step is understanding whether a given command itself is
slow at executing, or whether its execution has merely been
delayed because some other aspect of QEMU has delayed its execution.
If the server timestamps show it was very fast, then that indicates
delayed processing. Thus instead of debugging the slow command, I
can think about what scenarios would be responsible for the delay.
Perhaps a previous QMP command was very slow, or maybe there is
simply a large volume of QMP commands backlogged, or some part of
QEMU got blocked.

Another case would be a command that is normally fast, and sometimes
is slower, but still relatively fast. The network and queueing side
might be a significant enough proportion of the total time to obscure
the slowdown. If you can eliminate the non-execution time, you can
see the performance trends over time to spot the subtle slowdowns
and detect abnormal behaviour before it becomes too terrible.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]