UML - Is it using swap space?
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
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
Quoted 1 line · Gerhard Hannemann
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.
Quoted 1 line
The memory usage drops down to just 1M
The free memory, right? Well, probably it's just cached data.
Quoted 4 lines
yet tools such as
top and free never indcate that any swap space is ever being used. I provide the UML with a 512Mswap_fsfile 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).
Signature · 14 lines
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 [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel