qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <mlureau@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: marcandre lureau <marcandre.lureau@redhat.com>,
	jbelka@redhat.com, qemu-devel@nongnu.org,
	mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [RFC 0/3] qga: add guest-get-memory-info (for 2.5)
Date: Fri, 31 Jul 2015 14:05:17 -0400 (EDT)	[thread overview]
Message-ID: <1028101513.2049600.1438365917680.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20150731175447.GZ2392@redhat.com>

Hi

----- Original Message -----
> On Fri, Jul 31, 2015 at 07:36:46PM +0200, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > 
> > This series implement a new qemu guest agent command to get memory
> > information from the guest. This is based on ovirt-guest-agent
> > "memory-stats" message.
> > 
> > I couldn't find documentation for the ovirt message, but the list of
> > fields are summarized in this test
> > https://github.com/oVirt/ovirt-guest-agent/blob/master/tests/message_validator.py#L137
> > and according to how they are populated in the code, I adapted it to
> > the following GuestMemoryInfo structure fields:
> > 
> >  - mem-total: Total usable RAM.
> >  - mem-free:  Total of RAM that can be used without having to swap contents
> >  to disk.
> >  - mem-cached: In-RAM cache.
> >  - swap-total: Total amount of swap space available.
> >  - swap-free: Amount of swap space that is currently unused.
> >  - swap-in: Number of pages swapped-in per second.
> >  - swap-out: Number of pages swapped-out per second.
> >  - pf-major: Number of major page fault per second.
> >  - pf-minor: Number of minor page fault per second.
> > 
> > Implemented on Linux and Win32 based on ovirt implementations.
> 
> Interesting, currently the libvirt virDomainGetMemoryStats() API is backed
> by data we obtain from the virtio-balloon driver via QEMU monitor. For Linux
> at least this provides equiv of your mem-total, mem-free, swap-in, swap-out
> pf-major and pf-minor. So it lacks mem-cached, swap-total and swap-free
> I'm unclear in the Windows balloon driver supports this data or not too.

Ah, I should have thought about it! However, many guests don't have a balloon driver. So it could still be useful as a fallback imho

> > Note: the "per second" value differ between Linux and Win32. On Linux,
> > the value is computed based on the average since the last query,
> > however on win32 this seems to be an instantaneous value (they have
> > spikes, but often at 0). I have asked for help on SF:
> > 
> > http://serverfault.com/questions/709943/windows-equivalent-of-linux-vmstat-pswpin-and-pgfault
> > 
> > Related to RFE:
> > https://bugzilla.redhat.com/show_bug.cgi?id=1101915
> 
> I wonder if we would be better off extending the balloon driver to fill
> in the gaps we have there vs this guest agent impl. With the balloon
> agent we set things up so that the guest device periodically pushes the
> updated stats to QEMU. So when we're querying QEMU for the stats we don't
> actually block waiting on the guest OS at all, QEMU can answer directly.
> This feels more appealing that querying the guest agent where we have
> no reasonable expectation of prompt response. With a large enough number
> of guests, I think the balloon driver push approach will scale better
> than a guest agent approach.

I see, I think it really depends on the use case. Clearly for debugging, it doesn't need to be push-based. For load-balancing, I don't know either.

Please Jiri give some details on how these fields are used by ovirt. Thanks

      reply	other threads:[~2015-07-31 18:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 17:36 [Qemu-devel] [RFC 0/3] qga: add guest-get-memory-info (for 2.5) marcandre.lureau
2015-07-31 17:36 ` [Qemu-devel] [RFC 1/3] qga: add guest-get-memory-info json marcandre.lureau
2015-07-31 17:36 ` [Qemu-devel] [RFC 2/3] qga: implement get-memory-info for Linux marcandre.lureau
2015-07-31 17:45   ` Daniel P. Berrange
2015-07-31 18:02     ` Marc-André Lureau
2015-07-31 17:36 ` [Qemu-devel] [RFC 3/3] qga: implement get-memory-info on win32 marcandre.lureau
2015-07-31 17:54 ` [Qemu-devel] [RFC 0/3] qga: add guest-get-memory-info (for 2.5) Daniel P. Berrange
2015-07-31 18:05   ` Marc-André Lureau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1028101513.2049600.1438365917680.JavaMail.zimbra@redhat.com \
    --to=mlureau@redhat.com \
    --cc=berrange@redhat.com \
    --cc=jbelka@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).