Re: Why would top show the processes are using swap when there is no swap space?
- From: "Kaz Kylheku" <kkylheku@xxxxxxxxx>
- Date: 23 Mar 2007 16:04:51 -0700
On Mar 23, 9:05 am, "jinzish...@xxxxxxxxx" <jinzish...@xxxxxxxxx>
wrote:
My system has 4GB of RAM so I decided that I don't need to have swap
space.
However, in "top", I can still see that processes's virtual memory is
the
sum of the residential and swap memory. For example:
Swap: 0k total, 0k used, 0k free, 1189192k
cached
PID USER PR NI VIRT RES SWAP SHR S %CPU %MEM TIME+
COMMAND
9580 seki 15 0 2164 1160 1004 856 R 0.3 0.0 0:00.04 top
This is part of the output from "top".
We can confirm that no swap space is used.
Note that VIRT = RES + SWAP. SWAP is that part of the process which
isn't present in memory. This is pages which were never executed, or
perhaps which were scavenged to create free memory.
Even without swap configured, a process need not be all loaded into
memory at once.
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?
Pages of executables which are not locked into memory, and which are
not dirty, can be scavenged by the swapper. This simply means that
they are marked not-present, and the underlying memory frames are made
available for allocation. There is no need to write anything to
storage. (And in fact, that can't happen because executables and
shared libraries are mapped private).
.
- 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: Google Hiring Linux Networking L2/L3 etceteras
- Previous by thread: Re: Why would top show the processes are using swap when there is no swap space?
- Next by thread: Screen saver in text mode don't work
- Index(es):
Relevant Pages
|