From: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
To: Dietmar Maurer <dietmar-GhD4xmeTzCPby3iVrkZq2A@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Guest memory usage
Date: Wed, 06 Feb 2008 13:44:45 -0600 [thread overview]
Message-ID: <47AA0E2D.4040200@codemonkey.ws> (raw)
In-Reply-To: <E88155B5BD67CE4D87A3F1F70950B96A1AFF69-Mtm3uwm0nrWenyD9vqZGNUEOCMrvLtNR@public.gmane.org>
Dietmar Maurer wrote:
> Hi Anthony,
>
> The problem is that memory always grows, even after rebooting the VM.
>
When you start a VM, none of the memory for that VM has been reserved by
Linux regardless of what you specify in the '-m' parameter. Instead, as
the guest starts to access memory, Linux begins to allocate memory for
the guest.
free()'ing memory in the guest, rebooting the system, or anything else
that you might thing should reduce memory consumption within the guest
is meaningless to KVM. One a KVM guest has accessed memory, that memory
is permanently allocated.
There is, of course, an exception. If the host system is low on memory,
then Linux will request that KVM remove memory from the guest. Again,
this has nothing to do with what's going on in the guest, instead it has
to do with what's going on in the host.
The Linux host is acting to balance out memory in the most appropriate
way to maximize performance. The guest will get as much memory as it
needs until the host system starts getting low on memory.
If you want to know what much of the memory the guest is using, you need
to ask the guest to tell you that.
Regards,
Anthony Liguori
>> The VSZ/RSS is correct. What you're seeing is probably a mix
>> of two things. In the absence of MMU notifiers, not all
>>
>
> Sorry for asking stupid questions: Why are they absent? Isn't there a
> way
> to track memory usage? There are 'info tlb' and 'info mem' commands -
> isn't it possible to construct better memory usage statistics whith that
> info?
>
> - Dietmar
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> kvm-devel mailing list
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
prev parent reply other threads:[~2008-02-06 19:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 13:23 Guest memory usage Dietmar Maurer
[not found] ` <E88155B5BD67CE4D87A3F1F70950B96A1AFF63-Mtm3uwm0nrWenyD9vqZGNUEOCMrvLtNR@public.gmane.org>
2008-02-05 16:36 ` Anthony Liguori
[not found] ` <47A8907B.7040206-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-02-06 5:10 ` Dietmar Maurer
[not found] ` <E88155B5BD67CE4D87A3F1F70950B96A1AFF69-Mtm3uwm0nrWenyD9vqZGNUEOCMrvLtNR@public.gmane.org>
2008-02-06 19:44 ` Anthony Liguori [this message]
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=47AA0E2D.4040200@codemonkey.ws \
--to=anthony-rdkfgonbjusknkdkm+me6a@public.gmane.org \
--cc=dietmar-GhD4xmeTzCPby3iVrkZq2A@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/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