linux-um archives
 help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Gerhard Hannemann <gerhard.hannemann@printsoft.com>
Subject: Re: [uml-devel] UML - Is it using swap space?
Date: Fri, 21 Jan 2005 13:18:15 +0100	[thread overview]
Message-ID: <200501211318.16207.blaisorblade@yahoo.it> (raw)
In-Reply-To: <41F0A6F3.4030109@printsoft.com>

On Friday 21 January 2005 07:53, Gerhard Hannemann wrote:
> Why does it seem that my UML does is not using its swap space?
I don't think that this is related to UML itself. I describe the most common 
possibility below, which is a general Linux VM behaviour, but I don't know if 
you are experiencing what I describe - run the check I suggest and you'll 
verify if I guessed right or wrong.

If I'm right, then UML is simply not using its swap because there is no reason 
to use it. And no, 1M of free memory is not always a good one. Read on to 
understand why.
> The memory usage drops down to just 1M
The free memory, right? Well, probably it's just cached data.
> yet tools such as 
> top and free never indcate that any swap space is ever being used.
> I provide the UML with a 512M swap_fs file and swapon -s
> seems to indicate that its available.
Well, why should Linux use the swap if there's free memory? Free memory is 
unused memory, i.e. keeping memory free is mostly useless. It's better to use 
it as file cache. So even a machine without running processes can have only 
1M free, and the rest filled by cache data. And such a machine will never use 
its swap. (Swapping the file cache is brain-damaged, normally).

Look at the "free" output on the 2nd line:

-/+ buffers/cache: .... ....

It is the important one - it counts the memory which is used excluding the 
file cache. And it allows you to see if what I described is your situation or 
not.

However, the real problem would be if with free swap space the system went 
OOM, which is not your case... it happened with the 2.6.9 kernel - because of 
one VM bug (described on lwn.net/Kernel).

But you said in the other message you run a 2.4.27 UML, so it's not your case. 
(The host kernel being 2.6.9 is unrelated to the swapping inside the guest).
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

      reply	other threads:[~2005-01-21 12:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-21  6:53 [uml-devel] UML - Is it using swap space? Gerhard Hannemann
2005-01-21 12:18 ` Blaisorblade [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=200501211318.16207.blaisorblade@yahoo.it \
    --to=blaisorblade@yahoo.it \
    --cc=gerhard.hannemann@printsoft.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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