qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Paul Brook <paul@codesourcery.com>
Cc: Zhi Yong Wu <zwu.kernel@gmail.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	Alexander Graf <agraf@suse.de>,
	qemu-devel@nongnu.org, Stefan Weil <sw@weilnetz.de>
Subject: Re: [Qemu-devel] Memory: how to determine the max memory size of one VM?
Date: Sat, 11 Feb 2012 01:24:53 +0100	[thread overview]
Message-ID: <4F35B555.2050308@suse.de> (raw)
In-Reply-To: <201202102325.54423.paul@codesourcery.com>

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

Am 11.02.2012 00:25, schrieb Paul Brook:
>> 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.
> 
> We do? Significant compared to the size of guest ram?  That sounds like a bug.

Attached is a gnuplot from a simpletrace trace file while installing a
SLES 11 SP2 Release Candidate over slirp to virtio with -m 8G on an 8
GiB host (post-1.0 master).

It's not fully scientifically correct (it doesn't take into account
memory allocations not traced by QEMU itself, like pthreads) but it
suggests that after the initial surge to ~8.7 GB we have a fluctuation
of ~0.2 GB for 8 GiB guest RAM. It's larger than I'd expect at least.

Since the user was close to the limit, this lead to an abort. In their
case it was a pthread_create() that failed, and we used tap + virtio.

Didn't investigate the exact origin of the fluctuations (yet), but the
combination of the choice to have virtually all allocations abort (which
is okay at startup) and of doing allocations during guest runtime turns
out Bad(tm) in practice.

Andreas

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

[-- Attachment #2: memorytrace.png --]
[-- Type: image/png, Size: 15075 bytes --]

  reply	other threads:[~2012-02-11  0:24 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
2012-02-10 23:25       ` Paul Brook
2012-02-11  0:24         ` Andreas Färber [this message]
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=4F35B555.2050308@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=paul@codesourcery.com \
    --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).