From: "David S. Ahern" <daahern@cisco.com>
To: tfjellstrom@shaw.ca
Cc: kvm@vger.kernel.org
Subject: Re: Memory usage with qemu-kvm-0.12.1.1
Date: Mon, 04 Jan 2010 10:18:23 -0700 [thread overview]
Message-ID: <4B4222DF.30801@cisco.com> (raw)
In-Reply-To: <201001040812.09211.tfjellstrom@shaw.ca>
On 01/04/2010 08:12 AM, Thomas Fjellstrom wrote:
> Would this be normal for my setup? The virt usage seems abnormally high for
> all of my guests, especially the ones using over 800MB virt.
>
As I understand it virtual memory usage shows the allocated address
ranges (library mappings, dynamic allocations, etc). The guest memory
will be one of the anonymous mappings - with size equal to the memory
allocated to the VM. Until the guest accesses all of its memory (or if
qemu initialized it after the malloc), even that memory is only a
notional allocation. This is standard memory usage for linux -- mallocs
only create address mappings/allocations; it is not backed with physical
RAM until accessed.
As an example I have a linux guest with 512MB of RAM. The VmSize at
startup is 892700kB, though RSS is only 59792kB. If I login to the guest
and make use of memory within it then the guest memory becomes backed
from the host side. e.g., I have a memuser program that does nothing
more than malloc memory and initialize it. For the 512M guest, I run
this program with an input arg of 512M and voila the RSS for the qemu
process jumps to 527444kB while the VmSize has not changed.
David
next prev parent reply other threads:[~2010-01-04 17:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-27 15:51 Memory usage with qemu-kvm-0.12.1.1 Daniel Bareiro
2009-12-27 16:03 ` Avi Kivity
2009-12-27 16:32 ` Rik van Riel
2009-12-27 16:38 ` Avi Kivity
2009-12-27 16:45 ` Rik van Riel
2009-12-27 17:12 ` Avi Kivity
2009-12-27 17:21 ` Rik van Riel
2009-12-30 18:14 ` Hugh Dickins
2009-12-31 15:05 ` Daniel Bareiro
2009-12-31 17:02 ` Hugh Dickins
2009-12-31 18:36 ` Rik van Riel
2010-01-03 6:20 ` Avi Kivity
2010-01-01 16:59 ` Daniel Bareiro
2009-12-27 17:00 ` Daniel Bareiro
2009-12-27 17:20 ` Avi Kivity
2009-12-27 17:33 ` Avi Kivity
2009-12-27 18:07 ` Daniel Bareiro
2010-01-03 10:08 ` Thomas Fjellstrom
2010-01-04 15:12 ` Thomas Fjellstrom
2010-01-04 17:18 ` David S. Ahern [this message]
2010-01-24 7:43 ` Avi Kivity
2009-12-29 0:49 ` Daniel Bareiro
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=4B4222DF.30801@cisco.com \
--to=daahern@cisco.com \
--cc=kvm@vger.kernel.org \
--cc=tfjellstrom@shaw.ca \
/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