From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHyAK-00064L-KH for qemu-devel@nongnu.org; Mon, 24 Feb 2014 11:14:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHyAD-000192-AL for qemu-devel@nongnu.org; Mon, 24 Feb 2014 11:14:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:19748) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHyAD-00018p-0r for qemu-devel@nongnu.org; Mon, 24 Feb 2014 11:13:53 -0500 Message-ID: <530B6FB4.3030001@redhat.com> Date: Mon, 24 Feb 2014 09:13:40 -0700 From: Eric Blake MIME-Version: 1.0 References: <52FA399F.6070802@profihost.ag> <52FA6C5E.1060300@profihost.ag> <20140214150345.GL17391@stefanha-thinkpad.redhat.com> <52FE5D71.6040704@profihost.ag> <20140224150058.GA23185@stefanha-thinkpad.hitronhub.home> In-Reply-To: <20140224150058.GA23185@stefanha-thinkpad.hitronhub.home> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WHMnWboKNo7fCSBaGNIxOjn7FJ6EPg5Nk" Subject: Re: [Qemu-devel] memory allocation of migration changed? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Stefan Priebe Cc: Orit Wasserman , Juan Quintela , Peter Lieven , qemu-devel , Dave Gilbert This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WHMnWboKNo7fCSBaGNIxOjn7FJ6EPg5Nk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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? >=20 > I would approach it in terms of guest RAM allocation plus QEMU overhead= : >=20 > host_ram >=3D num_guests * guest_ram_size + num_guests * qemu_overhea= d >=20 > The qemu_overhead is the question mark. It depends on the QEMU feature= s > the guests have enabled and number of devices. >=20 > 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.) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --WHMnWboKNo7fCSBaGNIxOjn7FJ6EPg5Nk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTC2+0AAoJEKeha0olJ0Nqh9MIAI/lM/n1ndhqJlRpXOCAKr+b PMh+sRqd3MPRwzbOnQ7iVQ2ml3ik/QuLfK5jJOLE94TynfS32o/QcDYru5uRZ/ZT zmV4nF7nGmQTxpGNKMYx+sl1S8scO/VpKwSBAiQGnL37y6XdNK1pnkGm5kk933Yh IHL6nyun42g2tPYn/iAy1YqVrd2NwWgPCQsFSM6VXq6cvy9LRXA/vfw0s1pLp1yG 9CIquzJo4X29V6PPbdW6KF9h5qBAA7ht+N45dRONkKulcKe3IjetX/nsinv81w3C fmboUW+af9Bei7cW7n7xwF/zT53twscVb76c43js25aa4t1z+kT7T/PuhGGIIVI= =j+Qi -----END PGP SIGNATURE----- --WHMnWboKNo7fCSBaGNIxOjn7FJ6EPg5Nk--