* [uml-devel] UML - Is it using swap space?
@ 2005-01-21 6:53 Gerhard Hannemann
2005-01-21 12:18 ` Blaisorblade
0 siblings, 1 reply; 2+ messages in thread
From: Gerhard Hannemann @ 2005-01-21 6:53 UTC (permalink / raw)
To: user-mode-linux-devel
[-- Attachment #1.1: Type: text/plain, Size: 291 bytes --]
Why does it seem that my UML does is not using its swap space?
The memory usage drops down to just 1M 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.
Thanks
[-- Attachment #1.2: Type: text/html, Size: 671 bytes --]
[-- Attachment #2: "AVG certification" --]
[-- Type: text/plain, Size: 141 bytes --]
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.1 - Release Date: 19/01/2005
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [uml-devel] UML - Is it using swap space?
2005-01-21 6:53 [uml-devel] UML - Is it using swap space? Gerhard Hannemann
@ 2005-01-21 12:18 ` Blaisorblade
0 siblings, 0 replies; 2+ messages in thread
From: Blaisorblade @ 2005-01-21 12:18 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Gerhard Hannemann
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-21 12:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-21 6:53 [uml-devel] UML - Is it using swap space? Gerhard Hannemann
2005-01-21 12:18 ` Blaisorblade
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.