What is swapping/paging?

Fraser Campbell fraser-eicrhRFjby5dCsDujFhwbypxlwaOVQ5f at public.gmane.org
Sat Apr 9 18:17:40 UTC 2005


Hi,

I'm trying to figure out what processes are paging out, ps shows nothing 
swapped out.

The reason that I'm curious is that I have several servers with 4 GB RAM where 
more than 2GB of RAM are free (well, used by caching) but most  of swap 
(900MB) is used up.  Interactive performance on the machines is just fine but 
I still want to understand what is happening.

pmap looked like one way to get an answer but I'm not sure how to 
interpret the output ... I get this (as an example):

1:   init [2]
Address   Kbytes Mode  Offset           Device    Mapping
08048000      28 r-x-- 0000000000000000 0fd:00000 init
0804f000       4 rw--- 0000000000007000 0fd:00000 init
08050000     132 rw--- 0000000008050000 000:00000   [ anon ]
b7e9a000       4 rw--- 00000000b7e9a000 000:00000   [ anon ]
b7e9b000    1188 r-x-- 0000000000000000 0fd:00000 libc-2.3.2.so
b7fc4000      32 rw--- 0000000000129000 0fd:00000 libc-2.3.2.so
b7fcc000      12 rw--- 00000000b7fcc000 000:00000   [ anon ]
b7fe9000       4 rw--- 00000000b7fe9000 000:00000   [ anon ]
b7fea000      88 r-x-- 0000000000000000 0fd:00000 ld-2.3.2.so
b8000000       4 rw--- 0000000000015000 0fd:00000 ld-2.3.2.so
bffff000       4 rw--- 00000000bffff000 000:00000   [ stack ]
ffffe000       4 ----- 0000000000000000 000:00000   [ anon ]
mapped: 1504K    writeable/private: 196K    shared: 0K

What is "Device" referring to?  My swap is LV on MD, partition type FD (raid 
autodetect) so I thought 0fd:00000 might be referring to my swap device 
however after checking against another machine that assumption doesn't hold 
true.

I haven't been able to come up with a list of unique address/offset/device 
entries that add up to anywhere close to my swap usage ... am I barking up 
the wrong tree entirely, are there other ways to find out what's in swap?

I've been reading a lot about unix paging, swapping, etc. this morning but 
nothing I've found seems to answer the fundamental question, what's in swap.  
Pointers to the correct docs would be greatly appreciated.

Thanks!
-- 
Fraser Campbell <fraser-Txk5XLRqZ6CsTnJN9+BGXg at public.gmane.org>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list