Re: Why would top show the processes are using swap when there is no swap space?
- From: floyd@xxxxxxxxxx (Floyd L. Davidson)
- Date: Fri, 23 Mar 2007 09:34:40 -0800
"jinzishuai@xxxxxxxxx" <jinzishuai@xxxxxxxxx> wrote:
This is part of the output from "top".
We can confirm that no swap space is used.
However, VIRT=RES+SWAP and SWAP is not zero:
VIRT=2164, RES=1144, SWAP=1020 and 2164=1144+1020
My question is: since there is no space disk, where to swap to pages
to?
Thanks a lot.
I'm not sure if this is what you are seeing... but not all
virtual memory is RAM or SWAP! The only thing written to actual
swap space is data, not program code.
An ELF executable binary has code pages that are non-writeable
and can be shared between different processes. That means the
disk file can be, and is, used instead of swap space. When
program code is "swapped out", the RAM is merely marked as
available, but nothing is saved to disk because it is already on
disk. If part of it needs to be paged in it is read from the
original executable binary file, not from you swap space.
I don't know if it works this way, but if the program code for
your above program takes up 2164K, and only 1144K has been paged
in, it probably will show 1020K as in "SWAP".
--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@xxxxxxxxxx
.
- Follow-Ups:
- Re: Why would top show the processes are using swap when there is no swap space?
- From: jinzishuai@xxxxxxxxx
- Re: Why would top show the processes are using swap when there is no swap space?
- References:
- Why would top show the processes are using swap when there is no swap space?
- From: jinzishuai@xxxxxxxxx
- Why would top show the processes are using swap when there is no swap space?
- Prev by Date: Re: ext3 File System Performance Issue
- Next by Date: Screen saver in text mode don't work
- Previous by thread: Re: Why would top show the processes are using swap when there is no swap space?
- Next by thread: Re: Why would top show the processes are using swap when there is no swap space?
- Index(es):
Relevant Pages
|