qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Zhi Yong Wu <zwu.kernel@gmail.com>, Stefan Weil <sw@weilnetz.de>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] Memory: how to determine the max memory size of one VM?
Date: Fri, 10 Feb 2012 17:40:35 +0100	[thread overview]
Message-ID: <4F354883.602@suse.de> (raw)
In-Reply-To: <CAJSP0QXaWpD2oNNPnVM68qLFwRVyfWTpV4JCrqLARUQ74F88XA@mail.gmail.com>

Am 10.02.2012 11:36, schrieb Stefan Hajnoczi:
> On Fri, Feb 10, 2012 at 10:35 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>> On Fri, Feb 10, 2012 at 9:47 AM, Zhi Yong Wu <zwu.kernel@gmail.com> wrote:
>>> Today i tried to create one VM with the option "-m 4000", and found it
>>> failed with the following errors:
>>>
>>> Failed to allocate 4194304000 B: Cannot allocate memory
>>> Aborted (core dumped)
>>
>> Did you run on a 32-bit host?
> 
> BTW we shouldn't abort(3).

There's two slightly different scenarios to consider here:

i) User specifies command line options that cannot possibly work.
=> Ideally, yeah, we should just provide an understandable error message
and exit with error code.

ii) Some tracing of mine indicates QEMU has a highly dynamic memory
usage during runtime, be it due to network layer, block layer or
whatever exactly. Any memory allocation of those may fail due to soft or
hard limits, including pthread_create.
=> We should not abort because the previously running guest is gone and
it's data may be incomplete or corrupted. Not to mention that libvirt
shows an odd error message.

Problem is that there is no distinction at this point, so if we remove
the abort(3) for use case i) we loose it for debugging ii) as well.

What would be cool is finding some way to avoid dynamic allocations
after guest startup (i.e., preallocated memory pools) and dealing with
running out of space there in a non-fatal way.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-02-10 16:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10  9:47 [Qemu-devel] Memory: how to determine the max memory size of one VM? Zhi Yong Wu
2012-02-10 10:35 ` Stefan Hajnoczi
2012-02-10 10:36   ` Stefan Hajnoczi
2012-02-10 16:40     ` Andreas Färber [this message]
2012-02-10 23:25       ` Paul Brook
2012-02-11  0:24         ` Andreas Färber
2012-02-11  0:46           ` Paul Brook
2012-02-10 11:00   ` Zhi Yong Wu
2012-02-10 11:10     ` Stefan Hajnoczi
2012-02-10 11:23       ` Zhi Yong Wu
2012-02-10 11:31         ` Stefan Hajnoczi
2012-02-10 11:53           ` Zhi Yong Wu
2012-02-10 14:08             ` Stefan Hajnoczi
2012-02-10 14:36               ` Zhi Yong Wu
2012-02-10 16:20         ` Andreas Färber

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=4F354883.602@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=sw@weilnetz.de \
    --cc=zwu.kernel@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).