What is swapping/paging?

David Thornton david-FkEgs2FKm2NvBvnq28/GKQ at public.gmane.org
Mon Apr 11 04:14:45 UTC 2005


First off pagging and swapping behavior is VERY unix specific. FreeBSD's 
behavior is very different to Linux's or Solaris' behavior.

Heck mm in linux's 22. 2.4 2.6 and all the patches make things hard to 
keep track of.

So what are you using? You said Unix and this is a linux list. Can you 
give us a "uname -a".

Also can you tell us what you've read so far so those of us who want to 
learn more ( myself included ) can follow along?

These were good to me:
http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
http://www.linux-mm.org/

I have looked into how linux ( 2.4 ) uses memory. Check out the section 
called "Sar analysis"
http://www.quadratic.net/~david/gnuplot/

david

Fraser Campbell wrote:

>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!
>  
>

-- 
Let one walk alone,
commiting no sin with few wishes,
like an elephant in the forest.

--
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