qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>,
	Stefan Priebe <s.priebe@profihost.ag>
Cc: Orit Wasserman <owasserm@redhat.com>,
	Juan Quintela <quintela@redhat.com>, Peter Lieven <pl@kamp.de>,
	qemu-devel <qemu-devel@nongnu.org>,
	Dave Gilbert <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] memory allocation of migration changed?
Date: Mon, 24 Feb 2014 09:13:40 -0700	[thread overview]
Message-ID: <530B6FB4.3030001@redhat.com> (raw)
In-Reply-To: <20140224150058.GA23185@stefanha-thinkpad.hitronhub.home>

[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]

On 02/24/2014 08:00 AM, Stefan Hajnoczi wrote:

>> What is the right way to check for enough free memory and memory
>> usage of a specific vm?
> 
> I would approach it in terms of guest RAM allocation plus QEMU overhead:
> 
>   host_ram >= num_guests * guest_ram_size + num_guests * qemu_overhead
> 
> The qemu_overhead is the question mark.  It depends on the QEMU features
> the guests have enabled and number of devices.
> 
> QEMU also does not have a strict policy on predictable memory
> consumption, which makes it hard to give a formula for it.

In fact, at one point libvirt tried to put an automatic cap on the
memory usable by qemu by multiplying RAM size and accounting for a
margin of overhead, but no matter what heuristics we tried, we still got
complaints from users that their guests were killed when they ran out of
memory, and so we ended up reverting the automatic limits from libvirt.
 (You can still enforce a limit as an end user, although the libvirt
documentation no longer recommends attempting that, for as long as the
qemu allocation remains unpredictable.)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2014-02-24 16:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 14:54 [Qemu-devel] memory allocation of migration changed? Stefan Priebe - Profihost AG
2014-02-11 15:44 ` Stefan Hajnoczi
2014-02-11 16:22   ` Peter Lieven
2014-02-11 18:32     ` Stefan Priebe
2014-02-14 14:59       ` Stefan Hajnoczi
2014-02-14 18:15         ` Stefan Priebe
2014-02-11 18:30   ` Stefan Priebe
2014-02-14 15:03     ` Stefan Hajnoczi
2014-02-14 18:16       ` Stefan Priebe
2014-02-24 15:00         ` Stefan Hajnoczi
2014-02-24 16:13           ` Eric Blake [this message]
2014-03-12 19:15             ` Stefan Priebe

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=530B6FB4.3030001@redhat.com \
    --to=eblake@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=owasserm@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=s.priebe@profihost.ag \
    --cc=stefanha@gmail.com \
    /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).